Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: src/arm/stub-cache-arm.cc

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index a29c6d6cfb5f7920b0ebbf244f57888000c5f009..30f1b38f7fd5463b4aa92598c5f863087249a406 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -211,7 +211,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm,
Register scratch,
Register extra,
Register extra2) {
- Isolate* isolate = Isolate::Current();
+ Isolate* isolate = masm->isolate();
Label miss;
// Make sure that code is valid. The shifting code relies on the
@@ -289,14 +289,15 @@ void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype(
MacroAssembler* masm, int index, Register prototype, Label* miss) {
+ Isolate* isolate = masm->isolate();
// Check we're still in the same context.
__ ldr(prototype, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
- __ Move(ip, Isolate::Current()->global());
+ __ Move(ip, isolate->global());
__ cmp(prototype, ip);
__ b(ne, miss);
// Get the global function with the given index.
- JSFunction* function = JSFunction::cast(
- Isolate::Current()->global_context()->get(index));
+ JSFunction* function =
+ JSFunction::cast(isolate->global_context()->get(index));
// Load its initial map. The global functions all have initial maps.
__ Move(prototype, Handle<Map>(function->initial_map()));
// Load the prototype from the initial map.
@@ -511,9 +512,9 @@ void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC);
Code* code = NULL;
if (kind == Code::LOAD_IC) {
- code = Isolate::Current()->builtins()->builtin(Builtins::LoadIC_Miss);
+ code = masm->isolate()->builtins()->builtin(Builtins::kLoadIC_Miss);
} else {
- code = Isolate::Current()->builtins()->builtin(Builtins::KeyedLoadIC_Miss);
+ code = masm->isolate()->builtins()->builtin(Builtins::kKeyedLoadIC_Miss);
}
Handle<Code> ic(code);
@@ -952,7 +953,7 @@ static void StoreIntAsFloat(MacroAssembler* masm,
Register fval,
Register scratch1,
Register scratch2) {
- if (Isolate::Current()->cpu_features()->IsSupported(VFP3)) {
+ if (masm->isolate()->cpu_features()->IsSupported(VFP3)) {
CpuFeatures::Scope scope(VFP3);
__ vmov(s0, ival);
__ add(scratch1, dst, Operand(wordoffset, LSL, 2));
@@ -1164,7 +1165,7 @@ Register StubCompiler::CheckPrototypes(JSObject* object,
__ b(ne, miss);
// Log the check depth.
- LOG(Isolate::Current(), IntEvent("check-maps-depth", depth + 1));
+ LOG(masm()->isolate(), IntEvent("check-maps-depth", depth + 1));
// Perform security check for access to the global object.
ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded());
@@ -1500,7 +1501,7 @@ void CallStubCompiler::GenerateLoadFunctionFromCell(JSGlobalPropertyCell* cell,
MaybeObject* CallStubCompiler::GenerateMissBranch() {
- MaybeObject* maybe_obj = Isolate::Current()->stub_cache()->ComputeCallMiss(
+ MaybeObject* maybe_obj = masm()->isolate()->stub_cache()->ComputeCallMiss(
arguments().immediate(), kind_);
Object* obj;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
@@ -2047,7 +2048,7 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object,
// -- sp[argc * 4] : receiver
// -----------------------------------
- if (!Isolate::Current()->cpu_features()->IsSupported(VFP3))
+ if (!masm()->isolate()->cpu_features()->IsSupported(VFP3))
return HEAP->undefined_value();
CpuFeatures::Scope scope_vfp3(VFP3);
@@ -2612,8 +2613,7 @@ MaybeObject* StoreStubCompiler::CompileStoreField(JSObject* object,
r1, r2, r3,
&miss);
__ bind(&miss);
- Handle<Code> ic(Isolate::Current()->builtins()->builtin(
- Builtins::StoreIC_Miss));
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
// Return the generated code.
@@ -2662,8 +2662,7 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
// Handle store cache miss.
__ bind(&miss);
- Handle<Code> ic(Isolate::Current()->builtins()->builtin(
- Builtins::StoreIC_Miss));
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
// Return the generated code.
@@ -2712,8 +2711,7 @@ MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
// Handle store cache miss.
__ bind(&miss);
- Handle<Code> ic(Isolate::Current()->builtins()->builtin(
- Builtins::StoreIC_Miss));
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
// Return the generated code.
@@ -2757,8 +2755,7 @@ MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
// Handle store cache miss.
__ bind(&miss);
__ IncrementCounter(counters->named_store_global_inline_miss(), 1, r4, r3);
- Handle<Code> ic(Isolate::Current()->builtins()->builtin(
- Builtins::StoreIC_Miss));
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
// Return the generated code.
@@ -3211,9 +3208,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
__ bind(&miss);
__ DecrementCounter(counters->keyed_store_field(), 1, r3, r4);
- Handle<Code> ic(Isolate::Current()->builtins()->builtin(
- Builtins::KeyedStoreIC_Miss));
-
+ Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
// Return the generated code.
@@ -3283,8 +3278,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreSpecialized(
__ Ret();
__ bind(&miss);
- Handle<Code> ic(
- Isolate::Current()->builtins()->builtin(Builtins::KeyedStoreIC_Miss));
+ Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
// Return the generated code.
@@ -3428,10 +3422,8 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
// Jump to the generic stub in case the specialized code cannot handle the
// construction.
__ bind(&generic_stub_call);
- Code* code = Isolate::Current()->builtins()->builtin(
- Builtins::JSConstructStubGeneric);
- Handle<Code> generic_construct_stub(code);
- __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
+ Handle<Code> code = masm()->isolate()->builtins()->JSConstructStubGeneric();
+ __ Jump(code, RelocInfo::CODE_TARGET);
// Return the generated code.
return GetCode();
@@ -3518,7 +3510,7 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub(
__ ldr(value, MemOperand(r3, key, LSL, 1));
break;
case kExternalFloatArray:
- if (Isolate::Current()->cpu_features()->IsSupported(VFP3)) {
+ if (masm()->isolate()->cpu_features()->IsSupported(VFP3)) {
CpuFeatures::Scope scope(VFP3);
__ add(r2, r3, Operand(key, LSL, 1));
__ vldr(s0, r2, 0);
@@ -3557,7 +3549,7 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub(
// Now we can use r0 for the result as key is not needed any more.
__ mov(r0, r5);
- if (Isolate::Current()->cpu_features()->IsSupported(VFP3)) {
+ if (masm()->isolate()->cpu_features()->IsSupported(VFP3)) {
CpuFeatures::Scope scope(VFP3);
__ vmov(s0, value);
__ vcvt_f64_s32(d0, s0);
@@ -3572,7 +3564,7 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub(
// The test is different for unsigned int values. Since we need
// the value to be in the range of a positive smi, we can't
// handle either of the top two bits being set in the value.
- if (Isolate::Current()->cpu_features()->IsSupported(VFP3)) {
+ if (masm()->isolate()->cpu_features()->IsSupported(VFP3)) {
CpuFeatures::Scope scope(VFP3);
Label box_int, done;
__ tst(value, Operand(0xC0000000));
@@ -3636,7 +3628,7 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub(
} else if (array_type == kExternalFloatArray) {
// For the floating-point array type, we need to always allocate a
// HeapNumber.
- if (Isolate::Current()->cpu_features()->IsSupported(VFP3)) {
+ if (masm()->isolate()->cpu_features()->IsSupported(VFP3)) {
CpuFeatures::Scope scope(VFP3);
// Allocate a HeapNumber for the result. Don't use r0 and r1 as
// AllocateHeapNumber clobbers all registers - also when jumping due to
@@ -3829,10 +3821,9 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedStoreStub(
// The WebGL specification leaves the behavior of storing NaN and
// +/-Infinity into integer arrays basically undefined. For more
// reproducible behavior, convert these to zero.
- if (Isolate::Current()->cpu_features()->IsSupported(VFP3)) {
+ if (masm()->isolate()->cpu_features()->IsSupported(VFP3)) {
CpuFeatures::Scope scope(VFP3);
-
if (array_type == kExternalFloatArray) {
// vldr requires offset to be a multiple of 4 so we can not
// include -kHeapObjectTag into it.
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698