- 16 Dec, 2009 1 commit
-
-
lrn@chromium.org authored
Review URL: http://codereview.chromium.org/491077 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 14 Dec, 2009 1 commit
-
-
lrn@chromium.org authored
Review URL: http://codereview.chromium.org/492002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 11 Dec, 2009 1 commit
-
-
fschneider@chromium.org authored
Review URL: http://codereview.chromium.org/486008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Dec, 2009 2 commits
-
-
lrn@chromium.org authored
Started framework for all intra-functional outward control transfers, including handling of try/finally. Review URL: http://codereview.chromium.org/466033 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
Review URL: http://codereview.chromium.org/492003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Dec, 2009 1 commit
-
-
fschneider@chromium.org authored
Review URL: http://codereview.chromium.org/466056 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Dec, 2009 1 commit
-
-
fschneider@chromium.org authored
1. Refactor the structure of VisitAssignment: The existing code is not ideal to be extended with support for compound assignments. 2. Reuse common code for keyed property assigments: Now variables rewritten to a property (.arguments access) are treated like normal keyed property assignments. This allows us to remove some code duplication. Review URL: http://codereview.chromium.org/456024 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 25 Nov, 2009 1 commit
-
-
lrn@chromium.org authored
A few other tweaks. Review URL: http://codereview.chromium.org/435020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Nov, 2009 1 commit
-
-
fschneider@chromium.org authored
Review URL: http://codereview.chromium.org/384087 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Nov, 2009 1 commit
-
-
fschneider@chromium.org authored
We forgot resetting true-/false-label to NULL after evaluating the condition expression in dowhile- and while-loops. This change fixes this. This causes an assertion to fail in VisitIfStatement whenever there is an if-statement after a while-loop before. e.g. like in: var i=0, j=0; while(j<5) { j++; } if (i ==0 ) { j++; } Review URL: http://codereview.chromium.org/371070 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 09 Nov, 2009 1 commit
-
-
lrn@chromium.org authored
Review URL: http://codereview.chromium.org/372055 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 05 Nov, 2009 1 commit
-
-
fschneider@chromium.org authored
Until now we only handled global declarations. This change adds declarations of local variables, consts and functions. Review URL: http://codereview.chromium.org/368005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Nov, 2009 2 commits
-
-
fschneider@chromium.org authored
Review URL: http://codereview.chromium.org/366004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
There were two separate implementations of the function 'BuildBoilerplate' that is used to compile function declarations and function literals. The implementations did not do exactly the same thing. In particular, one ignored the flag --lazy. Combine the two implementations. Review URL: http://codereview.chromium.org/360011 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 03 Nov, 2009 1 commit
-
-
kmillikin@chromium.org authored
directly-applied function literals that are themselves compiled with the top-level code generator. The choice is guarded by a test that the function is anonymous (thus not expected to be recursive) and not in a loop. A compilation hint is set in the shared function info and used to make the choice. Review URL: http://codereview.chromium.org/341081 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Nov, 2009 6 commits
-
-
whesse@chromium.org authored
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
Review URL: http://codereview.chromium.org/340059 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
generator, mimicing the behavior of the optimizing compiler. Initialization blocks can only contain (thus begin and end) with a property assignment in toplevel code. Review URL: http://codereview.chromium.org/348038 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
a platform-independent structure and a few platform-specific helpers to do the heavy lifting. Review URL: http://codereview.chromium.org/342073 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
variable for the top-level compiler. Review URL: http://codereview.chromium.org/342058 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/340058 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 30 Oct, 2009 4 commits
-
-
kmillikin@chromium.org authored
Review URL: http://codereview.chromium.org/346022 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
context. Test contexts are used for the left subexpressions of short-circuited boolean operators. The right subexpressions inherit their expression context from the binary op expression. Compilation of short-circuited operations in effect and test context is straightforward: effect(e0 || e1) = test(e0, L0, L1) L1: effect(e1) L0: test(e0 || e1, L0, L1) = test(e0, L0, L2) L2: test(e1, L0, L1) Because the value of the first subexpression may be needed as the value of the whole expression in a value context, we introduce a hybrid value/test contest (the value is needed if true, but not if false). value(e0 || e1) = value/test(e0, L0, L1) L1: value(e1) L0: The compilation of value/test and test/value (introduced by boolean AND) is: value/test(e0 || e1, L0, L1) = value/test(e0, L0, L2) L2: value/test(e1, L0, L1) test/value(e0 || e1, L0, L1) = test(e0, L0, L2) L2: test/value(e1, L0, L1) Boolean AND is the dual. The AST nodes themselves (not their parents) are responsible for producing the proper result (effect, value, or control flow) depending on their context. Review URL: http://codereview.chromium.org/339082 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/342055 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
Since it is (currently) only an enum, change it to an enum (for now). Review URL: http://codereview.chromium.org/342035 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Oct, 2009 2 commits
-
-
kmillikin@chromium.org authored
scheme for enumerations (eg, EFFECT => kEffect). Remove the ability to move from one Location to another, which should never be necessary. Review URL: http://codereview.chromium.org/340034 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
context of the expressions they label. Introduce an "unintialized" location to catch failure to assign any location at all. Changed the object literal initialization on ARM to use a Store IC in the same cases where it did on the other platforms. This was required because the location of the literal property name is given an "unitialized" location. Review URL: http://codereview.chromium.org/339045 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 27 Oct, 2009 4 commits
-
-
fschneider@chromium.org authored
The generated code is similar to the existing code, but we never inline any IC code in the fast compiler. Review URL: http://codereview.chromium.org/337045 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
whesse@chromium.org authored
Review URL: http://codereview.chromium.org/334041 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
top-level code generator backend. Introduce function to move one location to another (source cannot be nowhere); to move registers, slots, and literals into a location; and to move a location to a register or slot. Review URL: http://codereview.chromium.org/338043 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
kmillikin@chromium.org authored
Literals now have a location of temporary by default and are responsible for moving themselves into their location like all other expressions. The constant location turned out not to allow us to avoid checking subexpressions in AST interior nodes, and it turned out to require checking after some normal calls to Visit (like for the arguments to a call). With this change do not have to check after a call to Visit that we got our result in the expected location. Review URL: http://codereview.chromium.org/339004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 26 Oct, 2009 1 commit
-
-
fschneider@chromium.org authored
I also added more unit tests for literals. Right now, the fast compiler produces code very similar to the existing code generator. We may consider different ways to further compact the generated code for top-level code. ARM always goes through a runtime function to initialize computed properties in an object literal whereas IA32 and x64 use StoreIC. Review URL: http://codereview.chromium.org/316009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 23 Oct, 2009 1 commit
-
-
kmillikin@chromium.org authored
in a non-test (ie, value or effect) context. (It is implicitly not in a test context because the code generator does not support expressions in a test context yet.) Compilation is essentially the same as in the optimized code generator. The expression (e0 || e1) is compiled as if it were (let (temp = e0) temp ? temp : e1). On ia32 and x64 a single shared ToBoolean stub is used to convert a value to a flag. The inlined checks assumed by the stub are reordered to compare to undefined (the common case in toplevel code?) first. On ARM a call to the runtime is used. In the interest of code size no checks are yet inlined on ARM. Review URL: http://codereview.chromium.org/334006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Oct, 2009 2 commits
-
-
kmillikin@chromium.org authored
currently compiled the same as with the optimizing compiler: they are cloned from a boilerplate object and the boilerplate objects are lazily constructed. Also changed argument pushing on ARM to use stm (store multiple), which required changing the order of arguments to the runtime functions DeclareGlobals and NewClosure. They were only used from generated code. Finally, changed the toplevel code generator so that stack pops to discard a temporary became addition to the stack pointer on ia32 and x64. Review URL: http://codereview.chromium.org/303021 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
For .result = /abc.*/g we generate the following IA-32 code: ... mov ebx,[edi+0x17] mov eax,[ebx+0xb] cmp eax, 0xf5d0e135 ;; object: 0xf5d0e135 <undefined> jnz done push ebx push 0x2 push 0xf5d13805 ;; object: 0xf5d13805 <String[5]: abc.*> push 0xf5d13815 ;; object: 0xf5d13815 <String[1]: g> call RuntimeStub_MaterializeRegExpLiteral done: push eax pop [ebp+0xf4] ... This is very similar to the code previously generated except we do not generate deferred code for the case where we call the runtime. On ARM we use the stm instruction to make pushing the arguments more compact. Review URL: http://codereview.chromium.org/300037 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 21 Oct, 2009 2 commits
-
-
fschneider@chromium.org authored
Review URL: http://codereview.chromium.org/313003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
fschneider@chromium.org authored
Adding calls to global functions to the new compiler. Review URL: http://codereview.chromium.org/302002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 Oct, 2009 1 commit
-
-
kmillikin@chromium.org authored
constant known at compile time. Do not ever use the stack to materialize (non-function-argument) constants. Currently, constants are only the non-materialized, non-function literals in the AST. It is a known issue that there is no test coverage for the cases of assigning a non-literal to a variable and returning a literal. Those code paths are unreachable and tests will be added when they become reachable. For the code '.result = true', we had previously on ia32: 27 push 0xf5c28161 ;; object: 0xf5c28161 <true> 32 pop [ebp+0xf4] Now: 27 mov eax,0xf5c26161 ;; object: 0xf5c26161 <true> 32 mov [ebp+0xf4],eax ======== We had previously on x64: 25 movq r10,0x7fb8c2f78199 ;; object: 0x7fb8c2f78199 <true> 35 push r10 37 pop [rbp-0x18] Now: 25 movq r10,0x7fb131386199 ;; object: 0x7fb131386199 <true> 35 movq [rbp-0x18],r10 The generated code for ARM did not include the extra memory traffic. It was already eliminated by the ARM assembler's push/pop elimination. Review URL: http://codereview.chromium.org/300003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Oct, 2009 1 commit
-
-
kmillikin@chromium.org authored
Slots appear only indirectly in the AST (through variables linked to variable proxies). Slots are shared among variable references, so putting compilation-time state on them is potentially a source of bugs. Avoid it for now. Review URL: http://codereview.chromium.org/284009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 15 Oct, 2009 1 commit
-
-
kmillikin@chromium.org authored
fast-mode code generator. AST expression nodes are annotated with a location when doing the initial syntactic check of the AST. In the current implementation, expression locations are 'temporary' (ie, allocated to the stack) or 'nowhere' (ie, the expression's value is not needed though it must be evaluated for side effects). For the assignment '.result = true' on IA32, we had before (with the true value already on top of the stack): 32 mov eax,[esp] 35 mov [ebp+0xf4],eax 38 pop eax Now: 32 pop [ebp+0xf4] ======== On x64, before: 37 movq rax,[rsp] 41 movq [rbp-0x18],rax 45 pop rax Now: 37 pop [rbp-0x18] ======== On ARM, before (with the true value in register ip): 36 str ip, [sp, #-4]! 40 ldr ip, [sp, #+0] 44 str ip, [fp, #-12] 48 add sp, sp, #4 Now: 36 str ip, [fp, #-12] Review URL: http://codereview.chromium.org/267118 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-