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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 3144002: Copy-on-write arrays. (Closed)
Patch Set: Review fixes. Created 10 years, 4 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/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.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 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 j(cc, branch); 255 j(cc, branch);
256 } 256 }
257 } 257 }
258 258
259 259
260 void MacroAssembler::Assert(Condition cc, const char* msg) { 260 void MacroAssembler::Assert(Condition cc, const char* msg) {
261 if (FLAG_debug_code) Check(cc, msg); 261 if (FLAG_debug_code) Check(cc, msg);
262 } 262 }
263 263
264 264
265 void MacroAssembler::AssertFastElements(Register elements) {
266 if (FLAG_debug_code) {
267 Label ok;
268 CompareRoot(FieldOperand(elements, HeapObject::kMapOffset),
269 Heap::kFixedArrayMapRootIndex);
270 j(equal, &ok);
271 CompareRoot(FieldOperand(elements, HeapObject::kMapOffset),
272 Heap::kFixedCOWArrayMapRootIndex);
273 j(equal, &ok);
274 Abort("JSObject with fast elements map has slow elements");
275 bind(&ok);
276 }
277 }
278
279
265 void MacroAssembler::Check(Condition cc, const char* msg) { 280 void MacroAssembler::Check(Condition cc, const char* msg) {
266 Label L; 281 Label L;
267 j(cc, &L); 282 j(cc, &L);
268 Abort(msg); 283 Abort(msg);
269 // will not return here 284 // will not return here
270 bind(&L); 285 bind(&L);
271 } 286 }
272 287
273 288
274 void MacroAssembler::CheckStackAlignment() { 289 void MacroAssembler::CheckStackAlignment() {
(...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 CPU::FlushICache(address_, size_); 2969 CPU::FlushICache(address_, size_);
2955 2970
2956 // Check that the code was patched as expected. 2971 // Check that the code was patched as expected.
2957 ASSERT(masm_.pc_ == address_ + size_); 2972 ASSERT(masm_.pc_ == address_ + size_);
2958 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2973 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2959 } 2974 }
2960 2975
2961 } } // namespace v8::internal 2976 } } // namespace v8::internal
2962 2977
2963 #endif // V8_TARGET_ARCH_X64 2978 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698