Commit Graph

21 Commits

Author SHA1 Message Date
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
deanm@chromium.org
a62c678814 Use 1 byte push REG instructions instead of the 2 byte ModRM version.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 14:02:24 +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
erik.corry@gmail.com
6e00a80354 You can't use BinarySearch on an unsorted array and other
sillinesses found while trying to get rid of medium-sized strings.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-26 20:50:05 +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
kasperl@chromium.org
b75da76a2b Apply Daniel's patch for array index strings.
Review URL: http://codereview.chromium.org/7869

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 06:20:57 +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
bak@chromium.org
80098968d8 - Inlined JSArray::SetContent.
- Implemented Runtime_KeyedGetProperty to make slow case faster.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-10 10:27:44 +00:00
bak@chromium.org
734328bdd9 - Fixed the parameter pasing to SharedStoreIC_ExtendStorage
for keyed store ic.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-07 10:32:39 +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
deanm@chromium.org
77196c5771 This is a new static flag system, designed to have all flags in a central place, and compiled into the binary without requiring static constructors for registration. All flags are moved out of the specific modules and into flags.defs, with different sections for debug, release, etc. The flag variables are always defined. For example, a debug flag in release mode still exists, but is read only and set to the default value.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-12 10:19:33 +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
feng.qian.v8
194baea8ca Move JS_VALUE_TYPE ahead of JS_OBJECT_TYPE to save one comparison in
KeyedLoadIC::GenerateGeneric (on IA32), and the same on ARM.
Re-assignmed FIRST_JS_OBJECT_TYPE to JS_VALUE_TYPE.

Also changed JS_OBJECT_TYPE to FIRST_JS_OBJECT_TYPE in several places where
FIRST_JS_OBJECT_TYPE is intended.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-02 23:52:50 +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
mads.s.ager@gmail.com
769cc962a0 Improved performance of unary addition by avoiding runtime calls.
Fixed the handling of '>' and '<=' to use right-to-left conversion and left-to-right evaluation as specified by ECMA-262.

Fixed a branch elimination bug on the ARM platform where incorrect code was generated because of overly aggressive branch elimination.

Improved performance of code that repeatedly assigns the same function to the same property of different objects with the same map.

Untangled DEBUG and ENABLE_DISASSEMBLER defines.  The disassembler no longer expects DEBUG to be defined.

Added platform-nullos.cc to serve as the basis for new platform implementations.


git-svn-id: http://v8.googlecode.com/svn/trunk@9 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-06 10:02:49 +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