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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 8820015: Hydrogen support for context allocated harmony bindings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't use the Variable object and fix test case. Created 9 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 ? isolate()->builtins()->StoreIC_Initialize_Strict() 2310 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2311 : isolate()->builtins()->StoreIC_Initialize(); 2311 : isolate()->builtins()->StoreIC_Initialize();
2312 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); 2312 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
2313 } 2313 }
2314 2314
2315 2315
2316 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2316 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2317 Register context = ToRegister(instr->context()); 2317 Register context = ToRegister(instr->context());
2318 Register result = ToRegister(instr->result()); 2318 Register result = ToRegister(instr->result());
2319 __ ldr(result, ContextOperand(context, instr->slot_index())); 2319 __ ldr(result, ContextOperand(context, instr->slot_index()));
2320 if (instr->hydrogen()->RequiresHoleCheck()) {
2321 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2322 __ cmp(result, ip);
2323 DeoptimizeIf(eq, instr->environment());
2324 }
2320 } 2325 }
2321 2326
2322 2327
2323 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 2328 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
2324 Register context = ToRegister(instr->context()); 2329 Register context = ToRegister(instr->context());
2325 Register value = ToRegister(instr->value()); 2330 Register value = ToRegister(instr->value());
2326 MemOperand target = ContextOperand(context, instr->slot_index()); 2331 MemOperand target = ContextOperand(context, instr->slot_index());
2332 if (instr->hydrogen()->RequiresHoleCheck()) {
2333 Register scratch = scratch0();
2334 __ ldr(scratch, target);
2335 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2336 __ cmp(scratch, ip);
2337 DeoptimizeIf(eq, instr->environment());
2338 }
2327 __ str(value, target); 2339 __ str(value, target);
2328 if (instr->hydrogen()->NeedsWriteBarrier()) { 2340 if (instr->hydrogen()->NeedsWriteBarrier()) {
2329 HType type = instr->hydrogen()->value()->type(); 2341 HType type = instr->hydrogen()->value()->type();
2330 SmiCheck check_needed = 2342 SmiCheck check_needed =
2331 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 2343 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
2332 __ RecordWriteContextSlot(context, 2344 __ RecordWriteContextSlot(context,
2333 target.offset(), 2345 target.offset(),
2334 value, 2346 value,
2335 scratch0(), 2347 scratch0(),
2336 kLRHasBeenSaved, 2348 kLRHasBeenSaved,
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
4743 ASSERT(osr_pc_offset_ == -1); 4755 ASSERT(osr_pc_offset_ == -1);
4744 osr_pc_offset_ = masm()->pc_offset(); 4756 osr_pc_offset_ = masm()->pc_offset();
4745 } 4757 }
4746 4758
4747 4759
4748 4760
4749 4761
4750 #undef __ 4762 #undef __
4751 4763
4752 } } // namespace v8::internal 4764 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.cc » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698