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

Side by Side Diff: src/mips/stub-cache-mips.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/mips/macro-assembler-mips.cc ('k') | src/objects.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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 // -- sp[(argc + 3) * 4] : first JS argument 689 // -- sp[(argc + 3) * 4] : first JS argument
690 // -- sp[(argc + 4) * 4] : receiver 690 // -- sp[(argc + 4) * 4] : receiver
691 // ----------------------------------- 691 // -----------------------------------
692 // Get the function and setup the context. 692 // Get the function and setup the context.
693 Handle<JSFunction> function = optimization.constant_function(); 693 Handle<JSFunction> function = optimization.constant_function();
694 __ LoadHeapObject(t1, function); 694 __ LoadHeapObject(t1, function);
695 __ lw(cp, FieldMemOperand(t1, JSFunction::kContextOffset)); 695 __ lw(cp, FieldMemOperand(t1, JSFunction::kContextOffset));
696 696
697 // Pass the additional arguments. 697 // Pass the additional arguments.
698 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 698 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
699 Handle<Object> call_data(api_call_info->data()); 699 Handle<Object> call_data(api_call_info->data(), masm->isolate());
700 if (masm->isolate()->heap()->InNewSpace(*call_data)) { 700 if (masm->isolate()->heap()->InNewSpace(*call_data)) {
701 __ li(a0, api_call_info); 701 __ li(a0, api_call_info);
702 __ lw(t2, FieldMemOperand(a0, CallHandlerInfo::kDataOffset)); 702 __ lw(t2, FieldMemOperand(a0, CallHandlerInfo::kDataOffset));
703 } else { 703 } else {
704 __ li(t2, call_data); 704 __ li(t2, call_data);
705 } 705 }
706 706
707 __ li(t3, Operand(ExternalReference::isolate_address())); 707 __ li(t3, Operand(ExternalReference::isolate_address()));
708 // Store JS function, call data and isolate. 708 // Store JS function, call data and isolate.
709 __ sw(t1, MemOperand(sp, 1 * kPointerSize)); 709 __ sw(t1, MemOperand(sp, 1 * kPointerSize));
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 1275
1276 // Build AccessorInfo::args_ list on the stack and push property name below 1276 // Build AccessorInfo::args_ list on the stack and push property name below
1277 // the exit frame to make GC aware of them and store pointers to them. 1277 // the exit frame to make GC aware of them and store pointers to them.
1278 __ push(receiver); 1278 __ push(receiver);
1279 __ mov(scratch2, sp); // scratch2 = AccessorInfo::args_ 1279 __ mov(scratch2, sp); // scratch2 = AccessorInfo::args_
1280 if (heap()->InNewSpace(callback->data())) { 1280 if (heap()->InNewSpace(callback->data())) {
1281 __ li(scratch3, callback); 1281 __ li(scratch3, callback);
1282 __ lw(scratch3, 1282 __ lw(scratch3,
1283 FieldMemOperand(scratch3, ExecutableAccessorInfo::kDataOffset)); 1283 FieldMemOperand(scratch3, ExecutableAccessorInfo::kDataOffset));
1284 } else { 1284 } else {
1285 __ li(scratch3, Handle<Object>(callback->data())); 1285 __ li(scratch3, Handle<Object>(callback->data(), masm()->isolate()));
1286 } 1286 }
1287 __ Subu(sp, sp, 4 * kPointerSize); 1287 __ Subu(sp, sp, 4 * kPointerSize);
1288 __ sw(reg, MemOperand(sp, 3 * kPointerSize)); 1288 __ sw(reg, MemOperand(sp, 3 * kPointerSize));
1289 __ sw(scratch3, MemOperand(sp, 2 * kPointerSize)); 1289 __ sw(scratch3, MemOperand(sp, 2 * kPointerSize));
1290 __ li(scratch3, Operand(ExternalReference::isolate_address())); 1290 __ li(scratch3, Operand(ExternalReference::isolate_address()));
1291 __ sw(scratch3, MemOperand(sp, 1 * kPointerSize)); 1291 __ sw(scratch3, MemOperand(sp, 1 * kPointerSize));
1292 __ sw(name_reg, MemOperand(sp, 0 * kPointerSize)); 1292 __ sw(name_reg, MemOperand(sp, 0 * kPointerSize));
1293 1293
1294 __ mov(a2, scratch2); // Saved in case scratch2 == a1. 1294 __ mov(a2, scratch2); // Saved in case scratch2 == a1.
1295 __ mov(a1, sp); // a1 (first argument - see note below) = Handle<String> 1295 __ mov(a1, sp); // a1 (first argument - see note below) = Handle<String>
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
3323 __ sw(a2, MemOperand(t5)); 3323 __ sw(a2, MemOperand(t5));
3324 __ Addu(t5, t5, kPointerSize); 3324 __ Addu(t5, t5, kPointerSize);
3325 __ jmp(&next); 3325 __ jmp(&next);
3326 __ bind(&not_passed); 3326 __ bind(&not_passed);
3327 // Set the property to undefined. 3327 // Set the property to undefined.
3328 __ sw(t7, MemOperand(t5)); 3328 __ sw(t7, MemOperand(t5));
3329 __ Addu(t5, t5, Operand(kPointerSize)); 3329 __ Addu(t5, t5, Operand(kPointerSize));
3330 __ bind(&next); 3330 __ bind(&next);
3331 } else { 3331 } else {
3332 // Set the property to the constant value. 3332 // Set the property to the constant value.
3333 Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i)); 3333 Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i),
3334 masm()->isolate());
3334 __ li(a2, Operand(constant)); 3335 __ li(a2, Operand(constant));
3335 __ sw(a2, MemOperand(t5)); 3336 __ sw(a2, MemOperand(t5));
3336 __ Addu(t5, t5, kPointerSize); 3337 __ Addu(t5, t5, kPointerSize);
3337 } 3338 }
3338 } 3339 }
3339 3340
3340 // Fill the unused in-object property fields with undefined. 3341 // Fill the unused in-object property fields with undefined.
3341 for (int i = shared->this_property_assignments_count(); 3342 for (int i = shared->this_property_assignments_count();
3342 i < function->initial_map()->inobject_properties(); 3343 i < function->initial_map()->inobject_properties();
3343 i++) { 3344 i++) {
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4224 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4224 } 4225 }
4225 } 4226 }
4226 4227
4227 4228
4228 #undef __ 4229 #undef __
4229 4230
4230 } } // namespace v8::internal 4231 } } // namespace v8::internal
4231 4232
4232 #endif // V8_TARGET_ARCH_MIPS 4233 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698