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

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

Issue 59103005: Proper fix for the issue exposed by r17459 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix ALL the casting confusion Created 7 years, 1 month 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/ic.cc ('k') | src/objects.h » ('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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 Register scratch1, 398 Register scratch1,
399 Register scratch2, 399 Register scratch2,
400 Label* miss_label) { 400 Label* miss_label) {
401 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label); 401 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label);
402 __ Ret(USE_DELAY_SLOT); 402 __ Ret(USE_DELAY_SLOT);
403 __ mov(v0, scratch1); 403 __ mov(v0, scratch1);
404 } 404 }
405 405
406 406
407 void StubCompiler::GenerateCheckPropertyCell(MacroAssembler* masm, 407 void StubCompiler::GenerateCheckPropertyCell(MacroAssembler* masm,
408 Handle<GlobalObject> global, 408 Handle<JSGlobalObject> global,
409 Handle<Name> name, 409 Handle<Name> name,
410 Register scratch, 410 Register scratch,
411 Label* miss) { 411 Label* miss) {
412 Handle<Cell> cell = GlobalObject::EnsurePropertyCell(global, name); 412 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
413 ASSERT(cell->value()->IsTheHole()); 413 ASSERT(cell->value()->IsTheHole());
414 __ li(scratch, Operand(cell)); 414 __ li(scratch, Operand(cell));
415 __ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 415 __ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
416 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 416 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
417 __ Branch(miss, ne, scratch, Operand(at)); 417 __ Branch(miss, ne, scratch, Operand(at));
418 } 418 }
419 419
420 420
421 void StoreStubCompiler::GenerateNegativeHolderLookup( 421 void StoreStubCompiler::GenerateNegativeHolderLookup(
422 MacroAssembler* masm, 422 MacroAssembler* masm,
423 Handle<JSObject> holder, 423 Handle<JSObject> holder,
424 Register holder_reg, 424 Register holder_reg,
425 Handle<Name> name, 425 Handle<Name> name,
426 Label* miss) { 426 Label* miss) {
427 if (holder->IsJSGlobalObject()) { 427 if (holder->IsJSGlobalObject()) {
428 GenerateCheckPropertyCell( 428 GenerateCheckPropertyCell(
429 masm, Handle<GlobalObject>::cast(holder), name, scratch1(), miss); 429 masm, Handle<JSGlobalObject>::cast(holder), name, scratch1(), miss);
430 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { 430 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) {
431 GenerateDictionaryNegativeLookup( 431 GenerateDictionaryNegativeLookup(
432 masm, miss, holder_reg, name, scratch1(), scratch2()); 432 masm, miss, holder_reg, name, scratch1(), scratch2());
433 } 433 }
434 } 434 }
435 435
436 436
437 // Generate StoreTransition code, value is passed in a0 register. 437 // Generate StoreTransition code, value is passed in a0 register.
438 // After executing generated code, the receiver_reg and name_reg 438 // After executing generated code, the receiver_reg and name_reg
439 // may be clobbered. 439 // may be clobbered.
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1143
1144 1144
1145 void StubCompiler::GenerateCheckPropertyCells(MacroAssembler* masm, 1145 void StubCompiler::GenerateCheckPropertyCells(MacroAssembler* masm,
1146 Handle<JSObject> object, 1146 Handle<JSObject> object,
1147 Handle<JSObject> holder, 1147 Handle<JSObject> holder,
1148 Handle<Name> name, 1148 Handle<Name> name,
1149 Register scratch, 1149 Register scratch,
1150 Label* miss) { 1150 Label* miss) {
1151 Handle<JSObject> current = object; 1151 Handle<JSObject> current = object;
1152 while (!current.is_identical_to(holder)) { 1152 while (!current.is_identical_to(holder)) {
1153 if (current->IsGlobalObject()) { 1153 if (current->IsJSGlobalObject()) {
1154 GenerateCheckPropertyCell(masm, 1154 GenerateCheckPropertyCell(masm,
1155 Handle<GlobalObject>::cast(current), 1155 Handle<JSGlobalObject>::cast(current),
1156 name, 1156 name,
1157 scratch, 1157 scratch,
1158 miss); 1158 miss);
1159 } 1159 }
1160 current = Handle<JSObject>(JSObject::cast(current->GetPrototype())); 1160 current = Handle<JSObject>(JSObject::cast(current->GetPrototype()));
1161 } 1161 }
1162 } 1162 }
1163 1163
1164 1164
1165 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 1165 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 2921
2922 // Return the generated code. 2922 // Return the generated code.
2923 return GetCode(kind(), Code::INTERCEPTOR, name); 2923 return GetCode(kind(), Code::INTERCEPTOR, name);
2924 } 2924 }
2925 2925
2926 2926
2927 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( 2927 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(
2928 Handle<JSObject> object, 2928 Handle<JSObject> object,
2929 Handle<JSObject> last, 2929 Handle<JSObject> last,
2930 Handle<Name> name, 2930 Handle<Name> name,
2931 Handle<GlobalObject> global) { 2931 Handle<JSGlobalObject> global) {
2932 Label success; 2932 Label success;
2933 2933
2934 NonexistentHandlerFrontend(object, last, name, &success, global); 2934 NonexistentHandlerFrontend(object, last, name, &success, global);
2935 2935
2936 __ bind(&success); 2936 __ bind(&success);
2937 // Return undefined if maps of the full prototype chain is still the same. 2937 // Return undefined if maps of the full prototype chain is still the same.
2938 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 2938 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
2939 __ Ret(); 2939 __ Ret();
2940 2940
2941 // Return the generated code. 2941 // Return the generated code.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
3174 // ----------------------------------- 3174 // -----------------------------------
3175 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3175 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3176 } 3176 }
3177 3177
3178 3178
3179 #undef __ 3179 #undef __
3180 3180
3181 } } // namespace v8::internal 3181 } } // namespace v8::internal
3182 3182
3183 #endif // V8_TARGET_ARCH_MIPS 3183 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698