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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 // -- esp[(argc + 5) * 4] : receiver 485 // -- esp[(argc + 5) * 4] : receiver
486 // ----------------------------------- 486 // -----------------------------------
487 // Get the function and setup the context. 487 // Get the function and setup the context.
488 Handle<JSFunction> function = optimization.constant_function(); 488 Handle<JSFunction> function = optimization.constant_function();
489 __ LoadHeapObject(edi, function); 489 __ LoadHeapObject(edi, function);
490 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 490 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
491 491
492 // Pass the additional arguments. 492 // Pass the additional arguments.
493 __ mov(Operand(esp, 2 * kPointerSize), edi); 493 __ mov(Operand(esp, 2 * kPointerSize), edi);
494 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 494 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
495 Handle<Object> call_data(api_call_info->data()); 495 Handle<Object> call_data(api_call_info->data(), masm->isolate());
496 if (masm->isolate()->heap()->InNewSpace(*call_data)) { 496 if (masm->isolate()->heap()->InNewSpace(*call_data)) {
497 __ mov(ecx, api_call_info); 497 __ mov(ecx, api_call_info);
498 __ mov(ebx, FieldOperand(ecx, CallHandlerInfo::kDataOffset)); 498 __ mov(ebx, FieldOperand(ecx, CallHandlerInfo::kDataOffset));
499 __ mov(Operand(esp, 3 * kPointerSize), ebx); 499 __ mov(Operand(esp, 3 * kPointerSize), ebx);
500 } else { 500 } else {
501 __ mov(Operand(esp, 3 * kPointerSize), Immediate(call_data)); 501 __ mov(Operand(esp, 3 * kPointerSize), Immediate(call_data));
502 } 502 }
503 __ mov(Operand(esp, 4 * kPointerSize), 503 __ mov(Operand(esp, 4 * kPointerSize),
504 Immediate(reinterpret_cast<int>(masm->isolate()))); 504 Immediate(reinterpret_cast<int>(masm->isolate())));
505 505
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1149
1150 __ push(receiver); // receiver 1150 __ push(receiver); // receiver
1151 __ mov(scratch2, esp); 1151 __ mov(scratch2, esp);
1152 ASSERT(!scratch2.is(reg)); 1152 ASSERT(!scratch2.is(reg));
1153 __ push(reg); // holder 1153 __ push(reg); // holder
1154 // Push data from AccessorInfo. 1154 // Push data from AccessorInfo.
1155 if (isolate()->heap()->InNewSpace(callback->data())) { 1155 if (isolate()->heap()->InNewSpace(callback->data())) {
1156 __ mov(scratch1, Immediate(callback)); 1156 __ mov(scratch1, Immediate(callback));
1157 __ push(FieldOperand(scratch1, ExecutableAccessorInfo::kDataOffset)); 1157 __ push(FieldOperand(scratch1, ExecutableAccessorInfo::kDataOffset));
1158 } else { 1158 } else {
1159 __ push(Immediate(Handle<Object>(callback->data()))); 1159 __ push(Immediate(Handle<Object>(callback->data(), isolate())));
1160 } 1160 }
1161 __ push(Immediate(reinterpret_cast<int>(isolate()))); 1161 __ push(Immediate(reinterpret_cast<int>(isolate())));
1162 1162
1163 // Save a pointer to where we pushed the arguments pointer. 1163 // Save a pointer to where we pushed the arguments pointer.
1164 // This will be passed as the const AccessorInfo& to the C++ callback. 1164 // This will be passed as the const AccessorInfo& to the C++ callback.
1165 __ push(scratch2); 1165 __ push(scratch2);
1166 1166
1167 __ push(name_reg); // name 1167 __ push(name_reg); // name
1168 __ mov(ebx, esp); // esp points to reference to name (handler). 1168 __ mov(ebx, esp); // esp points to reference to name (handler).
1169 1169
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 } else { 3300 } else {
3301 Label not_passed; 3301 Label not_passed;
3302 __ j(below_equal, &not_passed); 3302 __ j(below_equal, &not_passed);
3303 __ mov(ebx, Operand(ecx, arg_number * -kPointerSize)); 3303 __ mov(ebx, Operand(ecx, arg_number * -kPointerSize));
3304 __ bind(&not_passed); 3304 __ bind(&not_passed);
3305 } 3305 }
3306 // Store value in the property. 3306 // Store value in the property.
3307 __ mov(Operand(edx, i * kPointerSize), ebx); 3307 __ mov(Operand(edx, i * kPointerSize), ebx);
3308 } else { 3308 } else {
3309 // Set the property to the constant value. 3309 // Set the property to the constant value.
3310 Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i)); 3310 Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i),
3311 isolate());
3311 __ mov(Operand(edx, i * kPointerSize), Immediate(constant)); 3312 __ mov(Operand(edx, i * kPointerSize), Immediate(constant));
3312 } 3313 }
3313 } 3314 }
3314 3315
3315 // Fill the unused in-object property fields with undefined. 3316 // Fill the unused in-object property fields with undefined.
3316 for (int i = shared->this_property_assignments_count(); 3317 for (int i = shared->this_property_assignments_count();
3317 i < function->initial_map()->inobject_properties(); 3318 i < function->initial_map()->inobject_properties();
3318 i++) { 3319 i++) {
3319 __ mov(Operand(edx, i * kPointerSize), edi); 3320 __ mov(Operand(edx, i * kPointerSize), edi);
3320 } 3321 }
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3923 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3923 } 3924 }
3924 } 3925 }
3925 3926
3926 3927
3927 #undef __ 3928 #undef __
3928 3929
3929 } } // namespace v8::internal 3930 } } // namespace v8::internal
3930 3931
3931 #endif // V8_TARGET_ARCH_IA32 3932 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698