kmillikin@chromium.org
11d9e7ff51
Initial port of top-level code generator to ARM. For the constant
...
true at the top level we generate:
0 stmdb sp!, {r1, r8, fp, lr}
4 add fp, sp, #8
8 ldr ip, [r10, #+4]
12 ldr r2, [r10, #+0]
16 str ip, [sp, #-4]!
20 add lr, pc, #4
24 cmp sp, r2
28 ldrcc pc, [pc, #+68] ;; code: STUB, StackCheck, minor: 0
32 ldr ip, [pc, #+68] ;; object: 0xf5bc4161 <true>
36 str ip, [sp, #-4]!
40 ldr ip, [sp, #+0]
44 str ip, [fp, #-12]
48 add sp, sp, #4
52 ldr ip, [fp, #-12]
56 str ip, [sp, #-4]!
60 ldr r0, [sp], #+4
64 mov sp, fp ;; js return
68 ldmia sp!, {fp, lr}
72 add sp, sp, #4
76 bx lr
80 ldr r0, [r10, #+4]
84 mov sp, fp ;; js return
88 ldmia sp!, {fp, lr}
92 add sp, sp, #4
96 bx lr
100 constant pool begin
104 constant
108 constant
Review URL: http://codereview.chromium.org/264067
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 12:42:16 +00:00
whesse@chromium.org
99050519c4
Fix X64 build in the case that debugger support is disabled. Change function name from IsCallInstruction to IsPatchedReturnSequence on all platforms.
...
Review URL: http://codereview.chromium.org/267116
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 11:52:53 +00:00
kmillikin@chromium.org
d664dfaf4b
Port the initial fast code generator to x64. For the constant true in
...
top-level code we generate:
0 push rbp
1 movq rbp,rsp
4 push rsi
5 push rdi
6 push [r13+0x8]
10 cmpq rsp,[r13+0x0]
14 jnc 25 (0x7ff2c378ff19)
20 call 0x7ff2c377d260 ;; code: STUB, StackCheck, minor: 0
25 movq r10,0x7ff2e8608199 ;; object: 0x7ff2e8608199 <true>
35 push r10
37 movq rax,[rsp]
41 movq [rbp-0x18],rax
45 pop rax
46 push [rbp-0x18]
50 pop rax
51 movq rsp,rbp ;; js return
54 pop rbp
55 ret 0x8
58 int3
59 int3
60 int3
61 int3
62 int3
63 int3
64 movq rax,[r13+0x8]
68 movq rsp,rbp ;; js return
71 pop rbp
72 ret 0x8
75 int3
76 int3
77 int3
78 int3
79 int3
80 int3
Review URL: http://codereview.chromium.org/264066
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 11:21:26 +00:00
kmillikin@chromium.org
2d6169bf7e
Format the long lists of sources in the SConscript file to be one per
...
line. This is to make it easier to add and remove sources without
having to reformat line breaks. It also enables sorting with M-x
sort-lines (in emacs) or the like.
Review URL: http://codereview.chromium.org/276042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 08:22:24 +00:00
mikhail.naganov@gmail.com
efb8cee324
Add initial semi-working producers profile.
...
Turned on with '--log-producers' flag, also needs '--noinline-new' (this is temporarily), '--log-code', '--log-gc'. Not all allocations are traced (I'm investigating.)
Stacks are stored using weak handles. Thus, when an object is collected, its allocation stack is deleted.
Review URL: http://codereview.chromium.org/267077
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 07:50:23 +00:00
kmillikin@chromium.org
0bcb8adfbf
Fix GYP-based builds of V8.
...
TBR=iposva@chromium.org
Review URL: http://codereview.chromium.org/275020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 19:47:22 +00:00
kmillikin@chromium.org
f74e723599
Initial infrastructure for fast compilation of top-level code. The
...
fast code generator is optimized for compilation time and code size.
Currently it is only implemented on IA32. It is potentially triggered
for any code in the global scope (including code eval'd in the global
scope). It performs a syntactic check and chooses to compile in fast
mode if the AST contains only supported constructs and matches some
other constraints.
Initially supported constructs are
* ExpressionStatement,
* ReturnStatement,
* VariableProxy (variable references) to parameters and
stack-allocated locals,
* Assignment with lhs a parameter or stack-allocated local, and
* Literal
This allows compilation of literals at the top level and not much
else.
All intermediate values are allocated to temporaries and the stack is
used for all temporaries. The extra memory traffic is a known issue.
The code generated for 'true' is:
0 push ebp
1 mov ebp,esp
3 push esi
4 push edi
5 push 0xf5cca135 ;; object: 0xf5cca135 <undefined>
10 cmp esp,[0x8277efc]
16 jnc 27 (0xf5cbbb1b)
22 call 0xf5cac960 ;; code: STUB, StackCheck, minor: 0
27 push 0xf5cca161 ;; object: 0xf5cca161 <true>
32 mov eax,[esp]
35 mov [ebp+0xf4],eax
38 pop eax
39 mov eax,[ebp+0xf4]
42 mov esp,ebp ;; js return
44 pop ebp
45 ret 0x4
48 mov eax,0xf5cca135 ;; object: 0xf5cca135 <undefined>
53 mov esp,ebp ;; js return
55 pop ebp
56 ret 0x4
Review URL: http://codereview.chromium.org/273050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 19:30:50 +00:00
iposva@chromium.org
e0b8ab8815
- Add String::Concat(Handle<String> left, Handle<String> right) to the V8 API.
...
This is the first step to address http://crbug.com/23131 by creating
a series of V8 ConsStrings as more data arrives from the server.
Review URL: http://codereview.chromium.org/271085
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 15:26:38 +00:00
whesse@chromium.org
a6d3c1628e
Add comment to compilation-cache.cc explaining choice of 5 generations.
...
Review URL: http://codereview.chromium.org/267092
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 15:01:25 +00:00
antonm@chromium.org
1f8399bdda
Partially revert r2761.
...
Do not create handles for values of internal fields---this operation is performance
critical and plain pointers are safe.
Appy the same approach to External wrapping and unwrapping.
Plus some minor refactorings.
Review URL: http://codereview.chromium.org/270085
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 14:32:39 +00:00
fschneider@chromium.org
8d47ca4ed2
Fixed use of 'overwrite' flag for unary minus expressions.
...
Review URL: http://codereview.chromium.org/276018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 13:12:38 +00:00
vitalyr@chromium.org
a9880bde4d
Skip access checks for hidden properties.
...
Hidden properties are used like internal fields which do not have
access checks. The checks can cause problems because there may be no
current context. See http://crbug.com/24200 .
Review URL: http://codereview.chromium.org/271080
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 11:19:55 +00:00
fschneider@chromium.org
d0dc31afab
New mjsunit tests for the new compiler infrastructure. They
...
are in a separate subdirectory called 'compiler' in the mjsunit directory.
Review URL: http://codereview.chromium.org/273039
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 10:24:50 +00:00
christian.plesner.hansen@gmail.com
d6409e35a2
Implement ES5 Array.isArray
...
Patch by Jan de Mooij <jandemooij@gmail.com>
Review at http://codereview.chromium.org/271072
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 09:42:13 +00:00
lrn@chromium.org
c8b0f822ee
Fix overflow in failure "requested size" field.
...
Review URL: http://codereview.chromium.org/275016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 09:26:16 +00:00
mikhail.naganov@gmail.com
a7c0c6e5c4
A follow-up to r3009: add parentheses around one more anonymous function.
...
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/272045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 15:17:24 +00:00
yurys@chromium.org
a2549c96e8
Check that constructor is a FunctionMirror before calling .name(), otherwise we may end up calling name method on a mirror object that doesn't have it.
...
Review URL: http://codereview.chromium.org/271053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 14:28:09 +00:00
lrn@chromium.org
292323b355
X64: Fix bugs affecting Win64.
...
Increase stack space on Win64 sample and cctest executables.
Review URL: http://codereview.chromium.org/264047
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 10:56:13 +00:00
kmillikin@chromium.org
ac731896da
Remove a redundant field in the FunctionLiteral class. The boolean
...
contains_array_literal_ implies materialized_literal_count_ > 0, and
we appear not to need to know about array literals specifically.
Review URL: http://codereview.chromium.org/272043
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 09:37:17 +00:00
erik.corry@gmail.com
4ddc771c99
Use the USE_ARM_EABI macro consistently rather than the gcc-specific
...
__ARM_EABI__ macro to determine the ABI on ARM.
Review URL: http://codereview.chromium.org/274016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 08:58:24 +00:00
christian.plesner.hansen@gmail.com
cd3a47b6d2
Fixed trim test failure.
...
Review URL: http://codereview.chromium.org/273033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 08:29:19 +00:00
christian.plesner.hansen@gmail.com
f1354a299e
Add trim, trimLeft and trimRight methods to String
...
Based on a recent patch for Webkit.
trim is defined in ES 5 section 15.5.4.20.
Author: Jan de Mooij <jandemooij@gmail.com>
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 08:13:45 +00:00
kmillikin@chromium.org
a563800b4c
Initial implementation of printing the AST as a JSON string. This
...
implementation is not yet complete (it prints only the node name for
some AST constructs) and does not serialize everything needed to
reconstitute the AST.
It is motivated by a desire to prototype source-to-source
transformations in JavaScript itself (or anything else that can grok
JSON), but it should have other uses too.
Feedback is welcome.
Review URL: http://codereview.chromium.org/131101
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 15:06:28 +00:00
kmillikin@chromium.org
b6a215700e
Add a pair of missing breaks to a switch statement.
...
Review URL: http://codereview.chromium.org/267050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 14:00:11 +00:00
whesse@chromium.org
3aaa04a1c2
Change sscanf to atoi in test-debug.cc to make lint happy.
...
Review URL: http://codereview.chromium.org/264033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 13:55:06 +00:00
kmillikin@chromium.org
586f94f292
Split the AST LoopStatement type into separate types for do/while,
...
while, and for loops.
Previously they were distinguished by a type field, which required
runtime asserts to avoid invalid nodes (since not all loop types have
the same internal structure). Now they C++ type system is used to
require well-formed loop ASTs.
Because they do not share compilation code, we had very large
functions in the code generators that merely did a runtime dispatch to
a specific implementation based on the type.
Review URL: http://codereview.chromium.org/269049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 13:14:06 +00:00
whesse@chromium.org
c67291155b
Changes to comments only, fixing errors and grammar.
...
Review URL: http://codereview.chromium.org/269050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 12:42:20 +00:00
lrn@chromium.org
5767628039
Removed 31-bit smis.
...
Review URL: http://codereview.chromium.org/267049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 11:19:20 +00:00
iposva@chromium.org
3f1db0218e
- Update Xcode project.
...
Review URL: http://codereview.chromium.org/268030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-10 00:38:44 +00:00
peter.rybin@gmail.com
de3e260e38
Make cctest test-debug.cc more accurate
...
Review URL: http://codereview.chromium.org/243036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-09 16:27:47 +00:00
ager@chromium.org
947992185a
Add missing null check in Context::GetCurrent.
...
Review URL: http://codereview.chromium.org/272007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-09 08:21:56 +00:00
sgjesse@chromium.org
8222bf3ba7
Get rid of JSExitStub which is no longer used anywhere.
...
Review URL: http://codereview.chromium.org/268016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 15:10:14 +00:00
sgjesse@chromium.org
8105ae3106
Optimize calls to GenericBinaryStub.
...
The calls to GenericBinaryStub can now pass the arguments in registers instead of on the stack. It is supported for ADD, SUB, MUL and DIV. The convention in GenericBinaryStub is not changed so the left operand is passed in edx and the right one in eax. When the stub contains smi code arguments are always passed on the stack as the smi code has to have left and right operands on eax and ebx, so moving from edx,eax to eax,ebx is not worth it and the smi code also trashes the registers so if arguments where passed in registers they would have to be saved on the stack anyway.
Added flags to disable the use of certain Intel CPU features to make it easier to test different code paths.
Review URL: http://codereview.chromium.org/246075
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 14:27:46 +00:00
sgjesse@chromium.org
b9e7112d44
Add support for comisd and cmov in IA-32 disassembler.
...
Review URL: http://codereview.chromium.org/266014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 13:28:46 +00:00
lrn@chromium.org
830ba4e764
X64: Fix incompatability with previous revision.
...
And fix bug in debug-mode of 32-bit smi.
Review URL: http://codereview.chromium.org/261024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 13:09:28 +00:00
antonm@chromium.org
82a231412d
Introduce v8::Integer::NewFromUnsigned method.
...
Review URL: http://codereview.chromium.org/251100
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 12:54:29 +00:00
lrn@chromium.org
aed6a37c10
X64: Convert smis to holding 32 bits of payload.
...
Review URL: http://codereview.chromium.org/196139
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 12:36:12 +00:00
kmillikin@chromium.org
7efd193326
Guard the debug check at the start of every JS function with
...
--debug-code so it is not normally compiled in debug builds.
Review URL: http://codereview.chromium.org/268014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 11:49:58 +00:00
sgjesse@chromium.org
b0bc50aa85
Get rid of unused label varaible.
...
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/261023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 08:53:09 +00:00
sgjesse@chromium.org
1bb3f68904
Fix a file name in the Visual Studio project files.
...
Review URL: http://codereview.chromium.org/266004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 07:10:10 +00:00
sgjesse@chromium.org
cab2794e95
Change clamping 0..255 instruction sequence for pixel array code.
...
The subb instruction added to the IA-32 assembler is not used as dec_b ended up being used instead.
There is a mesurable difference.
Review URL: http://codereview.chromium.org/246076
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 07:09:46 +00:00
fschneider@chromium.org
6a949119eb
Added command line flag --sync_with_push (default: true) to
...
emit 'push' instead of 'sub esp, xxx' followed by 'mov' instructions
Reduces generated code size by 10-15% on several benchmarks.
Done on ia32 and x64 (no sync operation in the virtual frame on ARM
architecture)
Review URL: http://codereview.chromium.org/259058
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 14:55:41 +00:00
sgjesse@chromium.org
61650a0ece
Prepare push to trunk. Now working on version 1.3.16.
...
Review URL: http://codereview.chromium.org/267004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 13:42:24 +00:00
whesse@chromium.org
8d2a9df504
Double the CodeRange on X64 to 512 MB.
...
Review URL: http://codereview.chromium.org/265006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 12:47:49 +00:00
mikhail.naganov@gmail.com
572a050102
Fix a crash in Logger::LogCompiledFunctions due to a presence of scripts with disposed source.
...
When starting JS profiling under Chromium, a map from function addresses to function names is created. During it, for sourceful scripts, an attempt to access script source is made. This can cause a crash, if a source is an external string, which already has been disposed. We had a similar problem in the past with DebugGetLoadedScripts.
BUG=http://crbug.com/23768
TEST=test-log/Issue23768
Review URL: http://codereview.chromium.org/269003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 12:20:02 +00:00
sgjesse@chromium.org
36773e2ff1
Add missing newline to ChangeLog.
...
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/270002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 09:15:34 +00:00
sgjesse@chromium.org
8bc96eca76
Prepare push to trunk. Now working on version 1.3.15.
...
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/262004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 07:24:51 +00:00
whesse@chromium.org
d9dd84d5e4
Clean up fixups of calls to builtins. Fix lint error.
...
Review URL: http://codereview.chromium.org/259057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 13:59:56 +00:00
whesse@chromium.org
cc0c626d70
Add near calls (32-bit displacement) to Code objects on X64 platform.
...
Review URL: http://codereview.chromium.org/200095
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 13:11:05 +00:00
mike@belshe.com
83e621d331
Fix test error for IdleNotification() return code check.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 00:35:46 +00:00