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

Side by Side Diff: src/arm/virtual-frame-arm.cc

Issue 6594037: Strict Mode assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/builtins.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 PopToR0(); 325 PopToR0();
326 SpillAll(); 326 SpillAll();
327 __ mov(r2, Operand(name)); 327 __ mov(r2, Operand(name));
328 CallCodeObject(ic, mode, 0); 328 CallCodeObject(ic, mode, 0);
329 } 329 }
330 330
331 331
332 void VirtualFrame::CallStoreIC(Handle<String> name, 332 void VirtualFrame::CallStoreIC(Handle<String> name,
333 bool is_contextual, 333 bool is_contextual,
334 StrictModeFlag strict_mode) { 334 StrictModeFlag strict_mode) {
335 Handle<Code> ic(Builtins::builtin(strict_mode == kStrictMode 335 Handle<Code> ic(Builtins::builtin(
336 ? Builtins::StoreIC_Initialize_Strict 336 (strict_mode == kStrictMode) ? Builtins::StoreIC_Initialize_Strict
337 : Builtins::StoreIC_Initialize)); 337 : Builtins::StoreIC_Initialize));
338 PopToR0(); 338 PopToR0();
339 RelocInfo::Mode mode; 339 RelocInfo::Mode mode;
340 if (is_contextual) { 340 if (is_contextual) {
341 SpillAll(); 341 SpillAll();
342 __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 342 __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
343 mode = RelocInfo::CODE_TARGET_CONTEXT; 343 mode = RelocInfo::CODE_TARGET_CONTEXT;
344 } else { 344 } else {
345 EmitPop(r1); 345 EmitPop(r1);
346 SpillAll(); 346 SpillAll();
347 mode = RelocInfo::CODE_TARGET; 347 mode = RelocInfo::CODE_TARGET;
348 } 348 }
349 __ mov(r2, Operand(name)); 349 __ mov(r2, Operand(name));
350 CallCodeObject(ic, mode, 0); 350 CallCodeObject(ic, mode, 0);
351 } 351 }
352 352
353 353
354 void VirtualFrame::CallKeyedLoadIC() { 354 void VirtualFrame::CallKeyedLoadIC() {
355 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 355 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
356 PopToR1R0(); 356 PopToR1R0();
357 SpillAll(); 357 SpillAll();
358 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); 358 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
359 } 359 }
360 360
361 361
362 void VirtualFrame::CallKeyedStoreIC() { 362 void VirtualFrame::CallKeyedStoreIC(StrictModeFlag strict_mode) {
363 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); 363 Handle<Code> ic(Builtins::builtin(
364 (strict_mode == kStrictMode) ? Builtins::KeyedStoreIC_Initialize_Strict
365 : Builtins::KeyedStoreIC_Initialize));
364 PopToR1R0(); 366 PopToR1R0();
365 SpillAll(); 367 SpillAll();
366 EmitPop(r2); 368 EmitPop(r2);
367 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); 369 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
368 } 370 }
369 371
370 372
371 void VirtualFrame::CallCodeObject(Handle<Code> code, 373 void VirtualFrame::CallCodeObject(Handle<Code> code,
372 RelocInfo::Mode rmode, 374 RelocInfo::Mode rmode,
373 int dropped_args) { 375 int dropped_args) {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 break; 834 break;
833 } 835 }
834 ASSERT(register_allocation_map_ == 0); // Not yet implemented. 836 ASSERT(register_allocation_map_ == 0); // Not yet implemented.
835 } 837 }
836 838
837 #undef __ 839 #undef __
838 840
839 } } // namespace v8::internal 841 } } // namespace v8::internal
840 842
841 #endif // V8_TARGET_ARCH_ARM 843 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698