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

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

Issue 565034: Fast compiler: Load globals variables directly from property cells.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Merge Created 10 years, 10 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/ia32/macro-assembler-ia32.h ('k') | src/x64/fast-codegen-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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 CmpInstanceType(map, type); 331 CmpInstanceType(map, type);
332 } 332 }
333 333
334 334
335 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { 335 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
336 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), 336 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
337 static_cast<int8_t>(type)); 337 static_cast<int8_t>(type));
338 } 338 }
339 339
340 340
341 void MacroAssembler::CheckMap(Register obj,
342 Handle<Map> map,
343 Label* fail,
344 bool is_heap_object) {
345 if (!is_heap_object) {
346 test(obj, Immediate(kSmiTagMask));
347 j(zero, fail);
348 }
349 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map));
350 j(not_equal, fail);
351 }
352
353
341 Condition MacroAssembler::IsObjectStringType(Register heap_object, 354 Condition MacroAssembler::IsObjectStringType(Register heap_object,
342 Register map, 355 Register map,
343 Register instance_type) { 356 Register instance_type) {
344 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 357 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
345 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); 358 movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset));
346 ASSERT(kNotStringTag != 0); 359 ASSERT(kNotStringTag != 0);
347 test(instance_type, Immediate(kIsNotStringMask)); 360 test(instance_type, Immediate(kIsNotStringMask));
348 return zero; 361 return zero;
349 } 362 }
350 363
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 // Indicate that code has changed. 1604 // Indicate that code has changed.
1592 CPU::FlushICache(address_, size_); 1605 CPU::FlushICache(address_, size_);
1593 1606
1594 // Check that the code was patched as expected. 1607 // Check that the code was patched as expected.
1595 ASSERT(masm_.pc_ == address_ + size_); 1608 ASSERT(masm_.pc_ == address_ + size_);
1596 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1609 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1597 } 1610 }
1598 1611
1599 1612
1600 } } // namespace v8::internal 1613 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/fast-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698