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

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

Issue 9159008: MIPS: Change inlined cache of intanceof stub to use indirection through cell. (Closed)
Patch Set: Updated based on review comments. Created 8 years, 11 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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/macro-assembler-mips.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 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 // instanceof stub. 2011 // instanceof stub.
2012 Label cache_miss; 2012 Label cache_miss;
2013 Register map = temp; 2013 Register map = temp;
2014 __ lw(map, FieldMemOperand(object, HeapObject::kMapOffset)); 2014 __ lw(map, FieldMemOperand(object, HeapObject::kMapOffset));
2015 2015
2016 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 2016 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
2017 __ bind(deferred->map_check()); // Label for calculating code patching. 2017 __ bind(deferred->map_check()); // Label for calculating code patching.
2018 // We use Factory::the_hole_value() on purpose instead of loading from the 2018 // We use Factory::the_hole_value() on purpose instead of loading from the
2019 // root array to force relocation to be able to later patch with 2019 // root array to force relocation to be able to later patch with
2020 // the cached map. 2020 // the cached map.
2021 __ li(at, Operand(factory()->the_hole_value()), true); 2021 Handle<JSGlobalPropertyCell> cell =
2022 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value());
2023 __ li(at, Operand(Handle<Object>(cell)));
2024 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset));
2022 __ Branch(&cache_miss, ne, map, Operand(at)); 2025 __ Branch(&cache_miss, ne, map, Operand(at));
2023 // We use Factory::the_hole_value() on purpose instead of loading from the 2026 // We use Factory::the_hole_value() on purpose instead of loading from the
2024 // root array to force relocation to be able to later patch 2027 // root array to force relocation to be able to later patch
2025 // with true or false. 2028 // with true or false.
2026 __ li(result, Operand(factory()->the_hole_value()), true); 2029 __ li(result, Operand(factory()->the_hole_value()), true);
2027 __ Branch(&done); 2030 __ Branch(&done);
2028 2031
2029 // The inlined call site cache did not match. Check null and string before 2032 // The inlined call site cache did not match. Check null and string before
2030 // calling the deferred code. 2033 // calling the deferred code.
2031 __ bind(&cache_miss); 2034 __ bind(&cache_miss);
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
4706 ASSERT(!environment->HasBeenRegistered()); 4709 ASSERT(!environment->HasBeenRegistered());
4707 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4710 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4708 ASSERT(osr_pc_offset_ == -1); 4711 ASSERT(osr_pc_offset_ == -1);
4709 osr_pc_offset_ = masm()->pc_offset(); 4712 osr_pc_offset_ = masm()->pc_offset();
4710 } 4713 }
4711 4714
4712 4715
4713 #undef __ 4716 #undef __
4714 4717
4715 } } // namespace v8::internal 4718 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698