Commit Graph

26 Commits

Author SHA1 Message Date
iposva@chromium.org
be0c1e26e9 Add a meaningful name when disassembling code. This makes it easier
to match generated code to the originating source.

Review URL: http://codereview.chromium.org/39014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 06:14:34 +00:00
iposva@chromium.org
c81043b259 Follow on to r1368: Remove unnecessary HandleScope in the StubCompilers.
Review URL: http://codereview.chromium.org/27156

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 08:05:03 +00:00
deanm@chromium.org
b7c1200462 Fix a bunch of spelling mistakes :\
Review URL: http://codereview.chromium.org/18094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:08:34 +00:00
ager@chromium.org
3f383346aa Inline array loads in loops directly in the code instead of always
calling a stub.  The map to check against is unknown when generating
the code, so we patch the map check in the IC initialization code.

Loop nesting is currently not tracked on ARM.  I'll file feature
request bug reports for implementing this on ARM and add the number to
the TODOs before I commit.
Review URL: http://codereview.chromium.org/16409

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-22 12:56:32 +00:00
feng@chromium.org
5dea882447 Minor cleanup code in GenerateStoreField.
Review URL: http://codereview.chromium.org/11276

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 16:31:22 +00:00
deanm@chromium.org
8bea254650 Use shorter encoding for mov REG, IMM. Use Set() in two places to generate smaller code when the immediate is 0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 06:10:07 +00:00
ager@chromium.org
b595d914a8 In my final round of refactoring, I accidentally broke my string
lenght optimization.  Here is the fix: check that the instance type
not the receiver is JS_VALUE_TYPE.

Review URL: http://codereview.chromium.org/8656

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 10:25:35 +00:00
ager@chromium.org
721b7298e2 Allow inline caching for getting the length of string wrapper objects.
Review URL: http://codereview.chromium.org/8620

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 14:36:08 +00:00
kasperl@chromium.org
2dcb4d2c59 Fix issue 120 by patching the on-stack receiver in the
IC stubs for calls just before invoking the target
function instead of doing it before resolving the
function.
Review URL: http://codereview.chromium.org/8192

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 14:12:02 +00:00
erik.corry@gmail.com
0fc72f2b4e Serendipitously arrange the tags so that String.length() becomes a branch-free
operation.  I have another version of this change that does not remove the
special inline caches for difference sized strings.  The other version is ever
so slightly faster, but the nice thing about this version is that it removes
253 lines of code.
Review URL: http://codereview.chromium.org/8187

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 12:39:34 +00:00
kasperl@chromium.org
4e4fc50842 Get ready for fixing issue 120: Pin point the places
where the receiver needs to be patched with the proxy
and get ready of unnecessary function patching on ARM.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 12:58:17 +00:00
feng@chromium.org
42ef2c3d77 Split window support from V8.
Here is a description of the background and design of split window in Chrome and V8:
https://docs.google.com/a/google.com/Doc?id=chhjkpg_47fwddxbfr

This change list splits the window object into two parts: 1) an inner window object used as the global object of contexts; 2) an outer window object exposed to JavaScript and accessible by the name 'window'. Firefox did it awhile ago, here are some discussions: https://wiki.mozilla.org/Gecko:SplitWindow. One additional benefit of splitting window in Chrome is that accessing global variables don't need security checks anymore, it can improve applications that use many global variables.

V8 support of split window:
  There are a small number of changes on V8 api to support split window:
Security context is removed from V8, so does related API functions;
A global object can be detached from its context and reused by a new context;
Access checks on an object template can be turned on/off by default;
An object can turn on its access checks later;

  V8 has a new object type, ApiGlobalObject, which is the outer window object type. The existing JSGlobalObject becomes the inner window object type. Security checks are moved from JSGlobalObject to ApiGlobalObject. ApiGlobalObject is the one exposed to JavaScript, it is accessible through Context::Global(). ApiGlobalObject's prototype is set to JSGlobalObject so that property lookups are forwarded to JSGlobalObject. ApiGlobalObject forwards all other property access requests to JSGlobalObject, such as SetProperty, DeleteProperty, etc.

  Security token is moved to a global context, and ApiGlobalObject has a reference to its global context. JSGlobalObject has a reference to its global context as well. When accessing properties on a global object in JavaScript, the domain security check is performed by comparing the security token of the lexical context (Top::global_context()) to the token of global object's context. The check is only needed when the receiver is a window object, such as 'window.document'. Accessing global variables, such as 'var foo = 3; foo' does not need checks because the receiver is the inner window object.

  When an outer window is detached from its global context (when a frame navigates away from a page), it is completely detached from the inner window. A new context is created for the new page, and the outer global object is reused. At this point, the access check on the DOMWindow wrapper of the old context is turned on. The code in old context is still able to access DOMWindow properties, but it has to go through domain security checks.


It is debatable on how to implement the outer window object. Currently each property access function has to check if the receiver is ApiGlobalObject type. This approach might be error-prone that one may forget to check the receiver when adding new functions. It is unlikely a performance issue because accessing global variables are more common than 'window.foo' style coding.

I am still working on the ARM port, and I'd like to hear comments and suggestions on the best way to support it in V8.


Review URL: http://codereview.chromium.org/7366

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 19:07:58 +00:00
iposva@chromium.org
d4320b1053 Addressed review comment by Kasper:
- Factor out property load from CALL_IC and LOAD_IC.

Review URL: http://codereview.chromium.org/7431

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-16 05:58:09 +00:00
iposva@chromium.org
f1f096249c Fix CALL_IC to read properties out of the object in the presence
of in-object properties instead of always going to read out of
the properties array.

TBR=ager


Review URL: http://codereview.chromium.org/6607

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-15 07:48:45 +00:00
iposva@chromium.org
d09fcf70b7 Allocate room for expected number of properties based on the
constructor in the JSObject. This removes the need to allocate
a properties array if the object is never assigned any extra
properties.

Review URL: http://codereview.chromium.org/7341

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-15 06:03:26 +00:00
kasperl@chromium.org
b314b46b09 Make sure to check that the function prototype is a
real JavaScript object before looking for it in the
prototype chain during instanceof checks.
Review URL: http://codereview.chromium.org/6579

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-08 14:03:53 +00:00
kasperl@chromium.org
77643dbef6 Improve the generated code for the instanceof operator,
and extended the instanceof test case.
Review URL: http://codereview.chromium.org/6341

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-08 13:33:16 +00:00
bak@chromium.org
9dadae1bfb - Fixed Issue 3201: Embedded Google Calendar crashes the renderer
ExtendStorage did not work with keyed store IC.
- Reduced instructions generated when performing a tail call to 
  kSharedStoreIC_ExtendStorage
- Moved test/mjsunit/bugs/bug-109.js
  to test/mjsunit/keyed-storage-extend.js

Review URL: http://codereview.chromium.org/6526

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-07 09:28:04 +00:00
ager@chromium.org
70dcba4024 Exclude the bit-field bits from string hash codes. String hash codes
are always odd if the bit-field bits are included.

Modified a couple of debugger tests that relied on the ordering of
elements in descriptor arrays.  Descriptor arrays are sorted by
hash-code values, so the order changes if we change the hash code.
Review URL: http://codereview.chromium.org/6489

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-06 09:35:52 +00:00
bak@chromium.org
f42636b26f - Added fast case for extending the JSObject properties storage.
- Changed date to compute local_time_offset at load time.
  
Review URL: http://codereview.chromium.org/6441

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-03 09:16:12 +00:00
kasperl@chromium.org
9d30045d06 Refactored the code for entering and leaving exit frames (calls
from JavaScript to C++). Includes a few slight optimizations 
like keeping argv in a callee-saved register.
Review URL: http://codereview.chromium.org/4035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 08:19:26 +00:00
sgjesse@chromium.org
8391b19b07 Refactor the enum RelocMode changing the naming scheme from lower case to
upper case. Moved it into the RelocInfo class together with the associated
is_xxx functions. Renamed is_xxx to IsXxx in the process.

Removed the exit_js_frame mode as it was no longer used.

Patch Set 2 renames RELOC_MODE_COUNT to NUMBER_OF_MODES and fixes a couple of lint errors.
Review URL: http://codereview.chromium.org/3186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-22 13:57:03 +00:00
iposva@chromium.org
c5ee961882 Adapt to new calling convention on ARM:
- Simplified frame entry and frame exit code.
- Added ArgumentsAdaptorTrampoline and check for matching argument counts in the InvokePrologue.
- Removed definition and uses of USE_OLD_CALLING_CONVENTIONS.
- Changed MacroAssembler::InvokeBuiltin to match ia32 version.
- Start introducing convenience instructions in the ARM assembler as needed. These instructions take all Register parameters to avoid extra typing of "Operand(reg)".


To keep the architectures in sync these changes have been made to the ia32 files:
- Changed MacroAssembler::EnterFrame(StackFrame::Type type) to MacroAssembler::EnterInternalFrame().


These parts are still missing:
- unimplemented: Builtins::Generate_FunctionApply - large limit
- unimplemented: Builtins::Generate_ArgumentsAdaptorTrampoline - non-function call
- The files have not been lint'd yet.


Review URL: http://codereview.chromium.org/1930

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-12 03:29:06 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
mads.s.ager
31e7138e1a Improved performance of garbage collection by changing the way we use the marking stack in the event of stack overflow during full garbage collection and by changing the way we mark roots.
Cleaned up ARM version by removing top of stack caching and by introducing push/pop elimination.

Cleaned up the way runtime functions are called to allow runtime calls with no arguments.

Changed Windows build options to make sure that exceptions are disabled and that optimization flags are enabled.

Added first version of Visual Studio project files.



git-svn-id: http://v8.googlecode.com/svn/trunk@13 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-13 09:32:07 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00