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

Side by Side Diff: src/arm/stub-cache-arm.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 | « no previous file | src/ia32/stub-cache-ia32.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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label); 408 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label);
409 __ mov(r0, scratch1); 409 __ mov(r0, scratch1);
410 __ Ret(); 410 __ Ret();
411 } 411 }
412 412
413 413
414 // Generate code to check that a global property cell is empty. Create 414 // Generate code to check that a global property cell is empty. Create
415 // the property cell at compilation time if no cell exists for the 415 // the property cell at compilation time if no cell exists for the
416 // property. 416 // property.
417 void StubCompiler::GenerateCheckPropertyCell(MacroAssembler* masm, 417 void StubCompiler::GenerateCheckPropertyCell(MacroAssembler* masm,
418 Handle<GlobalObject> global, 418 Handle<JSGlobalObject> global,
419 Handle<Name> name, 419 Handle<Name> name,
420 Register scratch, 420 Register scratch,
421 Label* miss) { 421 Label* miss) {
422 Handle<Cell> cell = GlobalObject::EnsurePropertyCell(global, name); 422 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
423 ASSERT(cell->value()->IsTheHole()); 423 ASSERT(cell->value()->IsTheHole());
424 __ mov(scratch, Operand(cell)); 424 __ mov(scratch, Operand(cell));
425 __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 425 __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
426 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 426 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
427 __ cmp(scratch, ip); 427 __ cmp(scratch, ip);
428 __ b(ne, miss); 428 __ b(ne, miss);
429 } 429 }
430 430
431 431
432 void StoreStubCompiler::GenerateNegativeHolderLookup( 432 void StoreStubCompiler::GenerateNegativeHolderLookup(
433 MacroAssembler* masm, 433 MacroAssembler* masm,
434 Handle<JSObject> holder, 434 Handle<JSObject> holder,
435 Register holder_reg, 435 Register holder_reg,
436 Handle<Name> name, 436 Handle<Name> name,
437 Label* miss) { 437 Label* miss) {
438 if (holder->IsJSGlobalObject()) { 438 if (holder->IsJSGlobalObject()) {
439 GenerateCheckPropertyCell( 439 GenerateCheckPropertyCell(
440 masm, Handle<GlobalObject>::cast(holder), name, scratch1(), miss); 440 masm, Handle<JSGlobalObject>::cast(holder), name, scratch1(), miss);
441 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { 441 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) {
442 GenerateDictionaryNegativeLookup( 442 GenerateDictionaryNegativeLookup(
443 masm, miss, holder_reg, name, scratch1(), scratch2()); 443 masm, miss, holder_reg, name, scratch1(), scratch2());
444 } 444 }
445 } 445 }
446 446
447 447
448 // Generate StoreTransition code, value is passed in r0 register. 448 // Generate StoreTransition code, value is passed in r0 register.
449 // When leaving generated code after success, the receiver_reg and name_reg 449 // When leaving generated code after success, the receiver_reg and name_reg
450 // may be clobbered. Upon branch to miss_label, the receiver and name 450 // may be clobbered. Upon branch to miss_label, the receiver and name
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 1153
1154 1154
1155 void StubCompiler::GenerateCheckPropertyCells(MacroAssembler* masm, 1155 void StubCompiler::GenerateCheckPropertyCells(MacroAssembler* masm,
1156 Handle<JSObject> object, 1156 Handle<JSObject> object,
1157 Handle<JSObject> holder, 1157 Handle<JSObject> holder,
1158 Handle<Name> name, 1158 Handle<Name> name,
1159 Register scratch, 1159 Register scratch,
1160 Label* miss) { 1160 Label* miss) {
1161 Handle<JSObject> current = object; 1161 Handle<JSObject> current = object;
1162 while (!current.is_identical_to(holder)) { 1162 while (!current.is_identical_to(holder)) {
1163 if (current->IsGlobalObject()) { 1163 if (current->IsJSGlobalObject()) {
1164 GenerateCheckPropertyCell(masm, 1164 GenerateCheckPropertyCell(masm,
1165 Handle<GlobalObject>::cast(current), 1165 Handle<JSGlobalObject>::cast(current),
1166 name, 1166 name,
1167 scratch, 1167 scratch,
1168 miss); 1168 miss);
1169 } 1169 }
1170 current = Handle<JSObject>(JSObject::cast(current->GetPrototype())); 1170 current = Handle<JSObject>(JSObject::cast(current->GetPrototype()));
1171 } 1171 }
1172 } 1172 }
1173 1173
1174 1174
1175 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 1175 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2906 2906
2907 // Return the generated code. 2907 // Return the generated code.
2908 return GetCode(kind(), Code::INTERCEPTOR, name); 2908 return GetCode(kind(), Code::INTERCEPTOR, name);
2909 } 2909 }
2910 2910
2911 2911
2912 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( 2912 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(
2913 Handle<JSObject> object, 2913 Handle<JSObject> object,
2914 Handle<JSObject> last, 2914 Handle<JSObject> last,
2915 Handle<Name> name, 2915 Handle<Name> name,
2916 Handle<GlobalObject> global) { 2916 Handle<JSGlobalObject> global) {
2917 Label success; 2917 Label success;
2918 2918
2919 NonexistentHandlerFrontend(object, last, name, &success, global); 2919 NonexistentHandlerFrontend(object, last, name, &success, global);
2920 2920
2921 __ bind(&success); 2921 __ bind(&success);
2922 // Return undefined if maps of the full prototype chain are still the 2922 // Return undefined if maps of the full prototype chain are still the
2923 // same and no global property with this name contains a value. 2923 // same and no global property with this name contains a value.
2924 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); 2924 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
2925 __ Ret(); 2925 __ Ret();
2926 2926
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
3163 // ----------------------------------- 3163 // -----------------------------------
3164 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3164 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3165 } 3165 }
3166 3166
3167 3167
3168 #undef __ 3168 #undef __
3169 3169
3170 } } // namespace v8::internal 3170 } } // namespace v8::internal
3171 3171
3172 #endif // V8_TARGET_ARCH_ARM 3172 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698