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

Side by Side Diff: src/lithium.cc

Issue 149133004: A64: Synchronize with r17807. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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/lithium.h ('k') | src/macros.py » ('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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void LPointerMap::PrintTo(StringStream* stream) { 229 void LPointerMap::PrintTo(StringStream* stream) {
230 stream->Add("{"); 230 stream->Add("{");
231 for (int i = 0; i < pointer_operands_.length(); ++i) { 231 for (int i = 0; i < pointer_operands_.length(); ++i) {
232 if (i != 0) stream->Add(";"); 232 if (i != 0) stream->Add(";");
233 pointer_operands_[i]->PrintTo(stream); 233 pointer_operands_[i]->PrintTo(stream);
234 } 234 }
235 stream->Add("}"); 235 stream->Add("}");
236 } 236 }
237 237
238 238
239 int ElementsKindToShiftSize(ElementsKind elements_kind) {
240 switch (elements_kind) {
241 case EXTERNAL_BYTE_ELEMENTS:
242 case EXTERNAL_PIXEL_ELEMENTS:
243 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
244 return 0;
245 case EXTERNAL_SHORT_ELEMENTS:
246 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
247 return 1;
248 case EXTERNAL_INT_ELEMENTS:
249 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
250 case EXTERNAL_FLOAT_ELEMENTS:
251 return 2;
252 case EXTERNAL_DOUBLE_ELEMENTS:
253 case FAST_DOUBLE_ELEMENTS:
254 case FAST_HOLEY_DOUBLE_ELEMENTS:
255 return 3;
256 case FAST_SMI_ELEMENTS:
257 case FAST_ELEMENTS:
258 case FAST_HOLEY_SMI_ELEMENTS:
259 case FAST_HOLEY_ELEMENTS:
260 case DICTIONARY_ELEMENTS:
261 case NON_STRICT_ARGUMENTS_ELEMENTS:
262 return kPointerSizeLog2;
263 }
264 UNREACHABLE();
265 return 0;
266 }
267
268
269 int StackSlotOffset(int index) { 239 int StackSlotOffset(int index) {
270 if (index >= 0) { 240 if (index >= 0) {
271 // Local or spill slot. Skip the frame pointer, function, and 241 // Local or spill slot. Skip the frame pointer, function, and
272 // context in the fixed part of the frame. 242 // context in the fixed part of the frame.
273 return -(index + 3) * kPointerSize; 243 return -(index + 3) * kPointerSize;
274 } else { 244 } else {
275 // Incoming parameter. Skip the return address. 245 // Incoming parameter. Skip the return address.
276 return -(index + 1) * kPointerSize + kFPOnStackSize + kPCOnStackSize; 246 return -(index + 1) * kPointerSize + kFPOnStackSize + kPCOnStackSize;
277 } 247 }
278 } 248 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) { 338 LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
369 return LConstantOperand::Create(constant->id(), zone()); 339 return LConstantOperand::Create(constant->id(), zone());
370 } 340 }
371 341
372 342
373 int LChunk::GetParameterStackSlot(int index) const { 343 int LChunk::GetParameterStackSlot(int index) const {
374 // The receiver is at index 0, the first parameter at index 1, so we 344 // The receiver is at index 0, the first parameter at index 1, so we
375 // shift all parameter indexes down by the number of parameters, and 345 // shift all parameter indexes down by the number of parameters, and
376 // make sure they end up negative so they are distinguishable from 346 // make sure they end up negative so they are distinguishable from
377 // spill slots. 347 // spill slots.
378 int result = index - info()->scope()->num_parameters() - 1; 348 int result = index - info()->num_parameters() - 1;
349
379 ASSERT(result < 0); 350 ASSERT(result < 0);
380 return result; 351 return result;
381 } 352 }
382 353
383 354
384 // A parameter relative to ebp in the arguments stub. 355 // A parameter relative to ebp in the arguments stub.
385 int LChunk::ParameterAt(int index) { 356 int LChunk::ParameterAt(int index) {
386 ASSERT(-1 <= index); // -1 is the receiver. 357 ASSERT(-1 <= index); // -1 is the receiver.
387 return (1 + info()->scope()->num_parameters() - index) * 358 return (1 + info()->scope()->num_parameters() - index) *
388 kPointerSize; 359 kPointerSize;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 474
504 475
505 LPhase::~LPhase() { 476 LPhase::~LPhase() {
506 if (ShouldProduceTraceOutput()) { 477 if (ShouldProduceTraceOutput()) {
507 isolate()->GetHTracer()->TraceLithium(name(), chunk_); 478 isolate()->GetHTracer()->TraceLithium(name(), chunk_);
508 } 479 }
509 } 480 }
510 481
511 482
512 } } // namespace v8::internal 483 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.h ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698