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

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 6696107: Cleanup more isolate usage in ia32 files. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. 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/ia32/builtins-ia32.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index a863e39b3b86e0ff413c8d3478e06f0f409e0f1b..711616fc4d8287b58f8450ba8b241f6284fbe7c9 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -49,7 +49,8 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&check_heap_number);
__ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
- __ cmp(Operand(ebx), Immediate(FACTORY->heap_number_map()));
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(Operand(ebx), Immediate(factory->heap_number_map()));
__ j(not_equal, &call_builtin);
__ ret(0);
@@ -83,16 +84,17 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) {
// Initialize the rest of the function. We don't have to update the
// write barrier because the allocated object is in new space.
- __ mov(ebx, Immediate(FACTORY->empty_fixed_array()));
+ Factory* factory = masm->isolate()->factory();
+ __ mov(ebx, Immediate(factory->empty_fixed_array()));
__ mov(FieldOperand(eax, JSObject::kPropertiesOffset), ebx);
__ mov(FieldOperand(eax, JSObject::kElementsOffset), ebx);
__ mov(FieldOperand(eax, JSFunction::kPrototypeOrInitialMapOffset),
- Immediate(FACTORY->the_hole_value()));
+ Immediate(factory->the_hole_value()));
__ mov(FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset), edx);
__ mov(FieldOperand(eax, JSFunction::kContextOffset), esi);
__ mov(FieldOperand(eax, JSFunction::kLiteralsOffset), ebx);
__ mov(FieldOperand(eax, JSFunction::kNextFunctionLinkOffset),
- Immediate(FACTORY->undefined_value()));
+ Immediate(factory->undefined_value()));
// Initialize the code pointer in the function to be the one
// found in the shared function info object.
@@ -109,7 +111,7 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) {
__ pop(edx);
__ push(esi);
__ push(edx);
- __ push(Immediate(FACTORY->false_value()));
+ __ push(Immediate(factory->false_value()));
__ push(ecx); // Restore return address.
__ TailCallRuntime(Runtime::kNewClosure, 3, 1);
}
@@ -126,7 +128,8 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
__ mov(ecx, Operand(esp, 1 * kPointerSize));
// Setup the object header.
- __ mov(FieldOperand(eax, HeapObject::kMapOffset), FACTORY->context_map());
+ Factory* factory = masm->isolate()->factory();
+ __ mov(FieldOperand(eax, HeapObject::kMapOffset), factory->context_map());
__ mov(FieldOperand(eax, Context::kLengthOffset),
Immediate(Smi::FromInt(length)));
@@ -145,7 +148,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
__ mov(Operand(eax, Context::SlotOffset(Context::GLOBAL_INDEX)), ebx);
// Initialize the rest of the slots to undefined.
- __ mov(ebx, FACTORY->undefined_value());
+ __ mov(ebx, factory->undefined_value());
for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
__ mov(Operand(eax, Context::SlotOffset(i)), ebx);
}
@@ -181,7 +184,8 @@ void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) {
STATIC_ASSERT(kSmiTag == 0);
__ mov(ecx, FieldOperand(ecx, eax, times_half_pointer_size,
FixedArray::kHeaderSize));
- __ cmp(ecx, FACTORY->undefined_value());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(ecx, factory->undefined_value());
__ j(equal, &slow_case);
if (FLAG_debug_code) {
@@ -189,11 +193,11 @@ void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) {
Handle<Map> expected_map;
if (mode_ == CLONE_ELEMENTS) {
message = "Expected (writable) fixed array";
- expected_map = FACTORY->fixed_array_map();
+ expected_map = factory->fixed_array_map();
} else {
ASSERT(mode_ == COPY_ON_WRITE_ELEMENTS);
message = "Expected copy-on-write fixed array";
- expected_map = FACTORY->fixed_cow_array_map();
+ expected_map = factory->fixed_cow_array_map();
}
__ push(ecx);
__ mov(ecx, FieldOperand(ecx, JSArray::kElementsOffset));
@@ -242,7 +246,8 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
__ mov(eax, Operand(esp, 1 * kPointerSize));
// 'null' => false.
- __ cmp(eax, FACTORY->null_value());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(eax, factory->null_value());
__ j(equal, &false_result);
// Get the map and type of the heap object.
@@ -268,7 +273,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
__ bind(&not_string);
// HeapNumber => false iff +0, -0, or NaN.
- __ cmp(edx, FACTORY->heap_number_map());
+ __ cmp(edx, factory->heap_number_map());
__ j(not_equal, &true_result);
__ fldz();
__ fld_d(FieldOperand(eax, HeapNumber::kValueOffset));
@@ -2521,7 +2526,8 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) {
__ bind(&input_not_smi);
// Check if input is a HeapNumber.
__ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
- __ cmp(Operand(ebx), Immediate(FACTORY->heap_number_map()));
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(Operand(ebx), Immediate(factory->heap_number_map()));
__ j(not_equal, &runtime_call);
// Input is a HeapNumber. Push it on the FPU stack and load its
// low and high words into ebx, edx.
@@ -2989,14 +2995,15 @@ void FloatingPointHelper::LoadUnknownsAsIntegers(MacroAssembler* masm,
// If the argument is undefined it converts to zero (ECMA-262, section 9.5).
__ bind(&check_undefined_arg1);
- __ cmp(edx, FACTORY->undefined_value());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(edx, factory->undefined_value());
__ j(not_equal, conversion_failure);
__ mov(edx, Immediate(0));
__ jmp(&load_arg2);
__ bind(&arg1_is_object);
__ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
- __ cmp(ebx, FACTORY->heap_number_map());
+ __ cmp(ebx, factory->heap_number_map());
__ j(not_equal, &check_undefined_arg1);
// Get the untagged integer version of the edx heap number in ecx.
@@ -3020,14 +3027,14 @@ void FloatingPointHelper::LoadUnknownsAsIntegers(MacroAssembler* masm,
// If the argument is undefined it converts to zero (ECMA-262, section 9.5).
__ bind(&check_undefined_arg2);
- __ cmp(eax, FACTORY->undefined_value());
+ __ cmp(eax, factory->undefined_value());
__ j(not_equal, conversion_failure);
__ mov(ecx, Immediate(0));
__ jmp(&done);
__ bind(&arg2_is_object);
__ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
- __ cmp(ebx, FACTORY->heap_number_map());
+ __ cmp(ebx, factory->heap_number_map());
__ j(not_equal, &check_undefined_arg2);
// Get the untagged integer version of the eax heap number in ecx.
@@ -3114,14 +3121,15 @@ void FloatingPointHelper::LoadSSE2Operands(MacroAssembler* masm,
// Load operand in edx into xmm0, or branch to not_numbers.
__ test(edx, Immediate(kSmiTagMask));
__ j(zero, &load_smi_edx, not_taken); // Argument in edx is a smi.
- __ cmp(FieldOperand(edx, HeapObject::kMapOffset), FACTORY->heap_number_map());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(FieldOperand(edx, HeapObject::kMapOffset), factory->heap_number_map());
__ j(not_equal, not_numbers); // Argument in edx is not a number.
__ movdbl(xmm0, FieldOperand(edx, HeapNumber::kValueOffset));
__ bind(&load_eax);
// Load operand in eax into xmm1, or branch to not_numbers.
__ test(eax, Immediate(kSmiTagMask));
__ j(zero, &load_smi_eax, not_taken); // Argument in eax is a smi.
- __ cmp(FieldOperand(eax, HeapObject::kMapOffset), FACTORY->heap_number_map());
+ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), factory->heap_number_map());
__ j(equal, &load_float_eax);
__ jmp(not_numbers); // Argument in eax is not a number.
__ bind(&load_smi_edx);
@@ -3239,14 +3247,15 @@ void FloatingPointHelper::CheckFloatOperands(MacroAssembler* masm,
__ test(edx, Immediate(kSmiTagMask));
__ j(zero, &test_other, not_taken); // argument in edx is OK
__ mov(scratch, FieldOperand(edx, HeapObject::kMapOffset));
- __ cmp(scratch, FACTORY->heap_number_map());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(scratch, factory->heap_number_map());
__ j(not_equal, non_float); // argument in edx is not a number -> NaN
__ bind(&test_other);
__ test(eax, Immediate(kSmiTagMask));
__ j(zero, &done); // argument in eax is OK
__ mov(scratch, FieldOperand(eax, HeapObject::kMapOffset));
- __ cmp(scratch, FACTORY->heap_number_map());
+ __ cmp(scratch, factory->heap_number_map());
__ j(not_equal, non_float); // argument in eax is not a number -> NaN
// Fall-through: Both operands are numbers.
@@ -3292,7 +3301,7 @@ void GenericUnaryOpStub::Generate(MacroAssembler* masm) {
}
__ mov(edx, FieldOperand(eax, HeapObject::kMapOffset));
- __ cmp(edx, FACTORY->heap_number_map());
+ __ cmp(edx, masm->isolate()->factory()->heap_number_map());
__ j(not_equal, &slow);
if (overwrite_ == UNARY_OVERWRITE) {
__ mov(edx, FieldOperand(eax, HeapNumber::kExponentOffset));
@@ -3324,7 +3333,7 @@ void GenericUnaryOpStub::Generate(MacroAssembler* masm) {
// Check if the operand is a heap number.
__ mov(edx, FieldOperand(eax, HeapObject::kMapOffset));
- __ cmp(edx, FACTORY->heap_number_map());
+ __ cmp(edx, masm->isolate()->factory()->heap_number_map());
__ j(not_equal, &slow, not_taken);
// Convert the heap number in eax to an untagged integer in ecx.
@@ -3426,8 +3435,9 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ jmp(&powi);
// exponent is smi and base is a heapnumber.
__ bind(&base_nonsmi);
+ Factory* factory = masm->isolate()->factory();
__ cmp(FieldOperand(edx, HeapObject::kMapOffset),
- FACTORY->heap_number_map());
+ factory->heap_number_map());
__ j(not_equal, &call_runtime);
__ movdbl(xmm0, FieldOperand(edx, HeapNumber::kValueOffset));
@@ -3479,7 +3489,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
// on doubles.
__ bind(&exponent_nonsmi);
__ cmp(FieldOperand(eax, HeapObject::kMapOffset),
- FACTORY->heap_number_map());
+ factory->heap_number_map());
__ j(not_equal, &call_runtime);
__ movdbl(xmm1, FieldOperand(eax, HeapNumber::kValueOffset));
// Test if exponent is nan.
@@ -3496,7 +3506,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
__ bind(&base_not_smi);
__ cmp(FieldOperand(edx, HeapObject::kMapOffset),
- FACTORY->heap_number_map());
+ factory->heap_number_map());
__ j(not_equal, &call_runtime);
__ mov(ecx, FieldOperand(edx, HeapNumber::kExponentOffset));
__ and_(ecx, HeapNumber::kExponentMask);
@@ -3694,7 +3704,7 @@ void ArgumentsAccessStub::GenerateNewObject(MacroAssembler* masm) {
__ lea(edi, Operand(eax, GetArgumentsObjectSize()));
__ mov(FieldOperand(eax, JSObject::kElementsOffset), edi);
__ mov(FieldOperand(edi, FixedArray::kMapOffset),
- Immediate(FACTORY->fixed_array_map()));
+ Immediate(masm->isolate()->factory()->fixed_array_map()));
__ mov(FieldOperand(edi, FixedArray::kLengthOffset), ecx);
// Untag the length for the loop below.
@@ -3823,7 +3833,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Check that the JSArray is in fast case.
__ mov(ebx, FieldOperand(eax, JSArray::kElementsOffset));
__ mov(eax, FieldOperand(ebx, HeapObject::kMapOffset));
- __ cmp(eax, FACTORY->fixed_array_map());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(eax, factory->fixed_array_map());
__ j(not_equal, &runtime);
// Check that the last match info has space for the capture registers and the
// additional information.
@@ -3861,7 +3872,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ j(not_zero, &runtime);
// String is a cons string.
__ mov(edx, FieldOperand(eax, ConsString::kSecondOffset));
- __ cmp(Operand(edx), FACTORY->empty_string());
+ __ cmp(Operand(edx), factory->empty_string());
__ j(not_equal, &runtime);
__ mov(eax, FieldOperand(eax, ConsString::kFirstOffset));
__ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
@@ -4000,7 +4011,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Special handling of termination exceptions which are uncatchable
// by javascript code.
- __ cmp(eax, FACTORY->termination_exception());
+ __ cmp(eax, factory->termination_exception());
Label throw_termination_exception;
__ j(equal, &throw_termination_exception);
@@ -4012,7 +4023,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ bind(&failure);
// For failure to match, return null.
- __ mov(Operand(eax), FACTORY->null_value());
+ __ mov(Operand(eax), factory->null_value());
__ ret(4 * kPointerSize);
// Load RegExp data.
@@ -4113,7 +4124,8 @@ void RegExpConstructResultStub::Generate(MacroAssembler* masm) {
// Set elements to point to FixedArray allocated right after the JSArray.
// Interleave operations for better latency.
__ mov(edx, ContextOperand(esi, Context::GLOBAL_INDEX));
- __ mov(ecx, Immediate(FACTORY->empty_fixed_array()));
+ Factory* factory = masm->isolate()->factory();
+ __ mov(ecx, Immediate(factory->empty_fixed_array()));
__ lea(ebx, Operand(eax, JSRegExpResult::kSize));
__ mov(edx, FieldOperand(edx, GlobalObject::kGlobalContextOffset));
__ mov(FieldOperand(eax, JSObject::kElementsOffset), ebx);
@@ -4136,12 +4148,12 @@ void RegExpConstructResultStub::Generate(MacroAssembler* masm) {
// Set map.
__ mov(FieldOperand(ebx, HeapObject::kMapOffset),
- Immediate(FACTORY->fixed_array_map()));
+ Immediate(factory->fixed_array_map()));
// Set length.
__ mov(FieldOperand(ebx, FixedArray::kLengthOffset), ecx);
// Fill contents of fixed-array with the-hole.
__ SmiUntag(ecx);
- __ mov(edx, Immediate(FACTORY->the_hole_value()));
+ __ mov(edx, Immediate(factory->the_hole_value()));
__ lea(ebx, FieldOperand(ebx, FixedArray::kHeaderSize));
// Fill fixed array elements with hole.
// eax: JSArray.
@@ -4207,7 +4219,7 @@ void NumberToStringStub::GenerateLookupNumberStringCache(MacroAssembler* masm,
__ jmp(&smi_hash_calculated);
__ bind(&not_smi);
__ cmp(FieldOperand(object, HeapObject::kMapOffset),
- FACTORY->heap_number_map());
+ masm->isolate()->factory()->heap_number_map());
__ j(not_equal, not_found);
STATIC_ASSERT(8 == kDoubleSize);
__ mov(scratch, FieldOperand(object, HeapNumber::kValueOffset));
@@ -4324,14 +4336,14 @@ void CompareStub::Generate(MacroAssembler* masm) {
// Check for undefined. undefined OP undefined is false even though
// undefined == undefined.
NearLabel check_for_nan;
- __ cmp(edx, FACTORY->undefined_value());
+ __ cmp(edx, masm->isolate()->factory()->undefined_value());
__ j(not_equal, &check_for_nan);
__ Set(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc_))));
__ ret(0);
__ bind(&check_for_nan);
}
- // Test for NaN. Sadly, we can't just compare to FACTORY->nan_value(),
+ // Test for NaN. Sadly, we can't just compare to factory->nan_value(),
// so we do the second best thing - test it ourselves.
// Note: if cc_ != equal, never_nan_nan_ is not used.
if (never_nan_nan_ && (cc_ == equal)) {
@@ -4340,7 +4352,7 @@ void CompareStub::Generate(MacroAssembler* masm) {
} else {
NearLabel heap_number;
__ cmp(FieldOperand(edx, HeapObject::kMapOffset),
- Immediate(FACTORY->heap_number_map()));
+ Immediate(masm->isolate()->factory()->heap_number_map()));
__ j(equal, &heap_number);
if (cc_ != equal) {
// Call runtime on identical JSObjects. Otherwise return equal.
@@ -4417,7 +4429,7 @@ void CompareStub::Generate(MacroAssembler* masm) {
// Check if the non-smi operand is a heap number.
__ cmp(FieldOperand(ebx, HeapObject::kMapOffset),
- Immediate(FACTORY->heap_number_map()));
+ Immediate(masm->isolate()->factory()->heap_number_map()));
// If heap number, handle it in the slow case.
__ j(equal, &slow);
// Return non-equal (ebx is not zero)
@@ -4749,7 +4761,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
// call as this may lead to crashes in the IC code later.
if (FLAG_debug_code) {
NearLabel okay;
- __ cmp(eax, FACTORY->the_hole_value());
+ __ cmp(eax, masm->isolate()->factory()->the_hole_value());
__ j(not_equal, &okay);
__ int3();
__ bind(&okay);
@@ -4807,7 +4819,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
// Special handling of termination exceptions which are uncatchable
// by javascript code.
- __ cmp(eax, FACTORY->termination_exception());
+ __ cmp(eax, masm->isolate()->factory()->termination_exception());
__ j(equal, throw_termination_exception);
// Handle normal exception.
@@ -5108,7 +5120,8 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ bind(&loop);
__ cmp(scratch, Operand(prototype));
__ j(equal, &is_instance);
- __ cmp(Operand(scratch), Immediate(FACTORY->null_value()));
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(Operand(scratch), Immediate(factory->null_value()));
__ j(equal, &is_not_instance);
__ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset));
__ mov(scratch, FieldOperand(scratch, Map::kPrototypeOffset));
@@ -5122,7 +5135,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
times_pointer_size, roots_address), eax);
} else {
// Get return address and delta to inlined map check.
- __ mov(eax, FACTORY->true_value());
+ __ mov(eax, factory->true_value());
__ mov(scratch, Operand(esp, 0 * kPointerSize));
__ sub(scratch, Operand(esp, 1 * kPointerSize));
if (FLAG_debug_code) {
@@ -5144,7 +5157,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
scratch, times_pointer_size, roots_address), eax);
} else {
// Get return address and delta to inlined map check.
- __ mov(eax, FACTORY->false_value());
+ __ mov(eax, factory->false_value());
__ mov(scratch, Operand(esp, 0 * kPointerSize));
__ sub(scratch, Operand(esp, 1 * kPointerSize));
if (FLAG_debug_code) {
@@ -5168,7 +5181,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ j(not_equal, &slow, not_taken);
// Null is not instance of anything.
- __ cmp(object, FACTORY->null_value());
+ __ cmp(object, factory->null_value());
__ j(not_equal, &object_not_null);
__ Set(eax, Immediate(Smi::FromInt(1)));
__ ret((HasArgsInRegisters() ? 0 : 2) * kPointerSize);
@@ -5209,10 +5222,10 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
NearLabel true_value, done;
__ test(eax, Operand(eax));
__ j(zero, &true_value);
- __ mov(eax, FACTORY->false_value());
+ __ mov(eax, factory->false_value());
__ jmp(&done);
__ bind(&true_value);
- __ mov(eax, FACTORY->true_value());
+ __ mov(eax, factory->true_value());
__ bind(&done);
__ ret((HasArgsInRegisters() ? 0 : 2) * kPointerSize);
}
@@ -5341,7 +5354,7 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
// the case we would rather go to the runtime system now to flatten
// the string.
__ cmp(FieldOperand(object_, ConsString::kSecondOffset),
- Immediate(FACTORY->empty_string()));
+ Immediate(masm->isolate()->factory()->empty_string()));
__ j(not_equal, &call_runtime_);
// Get the first of the two strings and load its instance type.
__ mov(object_, FieldOperand(object_, ConsString::kFirstOffset));
@@ -5386,7 +5399,10 @@ void StringCharCodeAtGenerator::GenerateSlow(
// Index is not a smi.
__ bind(&index_not_smi_);
// If index is a heap number, try converting it to an integer.
- __ CheckMap(index_, FACTORY->heap_number_map(), index_not_number_, true);
+ __ CheckMap(index_,
+ masm->isolate()->factory()->heap_number_map(),
+ index_not_number_,
+ true);
call_helper.BeforeCall(masm);
__ push(object_);
__ push(index_);
@@ -5447,7 +5463,8 @@ void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) {
((~String::kMaxAsciiCharCode) << kSmiTagSize)));
__ j(not_zero, &slow_case_, not_taken);
- __ Set(result_, Immediate(FACTORY->single_character_string_cache()));
+ Factory* factory = masm->isolate()->factory();
+ __ Set(result_, Immediate(factory->single_character_string_cache()));
STATIC_ASSERT(kSmiTag == 0);
STATIC_ASSERT(kSmiTagSize == 1);
STATIC_ASSERT(kSmiShiftSize == 0);
@@ -5455,7 +5472,7 @@ void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) {
__ mov(result_, FieldOperand(result_,
code_, times_half_pointer_size,
FixedArray::kHeaderSize));
- __ cmp(result_, FACTORY->undefined_value());
+ __ cmp(result_, factory->undefined_value());
__ j(equal, &slow_case_, not_taken);
__ bind(&exit_);
}
@@ -5983,9 +6000,10 @@ void StringHelper::GenerateTwoCharacterSymbolTableProbe(MacroAssembler* masm,
SymbolTable::kElementsStartOffset));
// If entry is undefined no string with this hash can be found.
- __ cmp(candidate, FACTORY->undefined_value());
+ Factory* factory = masm->isolate()->factory();
+ __ cmp(candidate, factory->undefined_value());
__ j(equal, not_found);
- __ cmp(candidate, FACTORY->null_value());
+ __ cmp(candidate, factory->null_value());
__ j(equal, &next_probe[i]);
// If length is not 2 the string is not a candidate.
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698