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

Side by Side Diff: src/deoptimizer.h

Issue 7934002: MIPS: crankshaft implementation (Closed)
Patch Set: Rebased to r9640, including new-gc. Created 9 years, 2 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
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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 JSFunction* GetFunction() const { return function_; } 362 JSFunction* GetFunction() const { return function_; }
363 363
364 unsigned GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, int slot_index); 364 unsigned GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, int slot_index);
365 365
366 intptr_t GetFrameSlot(unsigned offset) { 366 intptr_t GetFrameSlot(unsigned offset) {
367 return *GetFrameSlotPointer(offset); 367 return *GetFrameSlotPointer(offset);
368 } 368 }
369 369
370 double GetDoubleFrameSlot(unsigned offset) { 370 double GetDoubleFrameSlot(unsigned offset) {
371 return *reinterpret_cast<double*>(GetFrameSlotPointer(offset)); 371 intptr_t* ptr = GetFrameSlotPointer(offset);
372 #if V8_TARGET_ARCH_MIPS
373 // Prevent gcc from using load-double (mips ldc1) on (possibly)
374 // non-64-bit aligned double. Uses two lwc1 instructions.
375 union conversion {
376 double d;
377 uint32_t u[2];
378 } c;
379 c.u[0] = *reinterpret_cast<uint32_t*>(ptr);
380 c.u[1] = *(reinterpret_cast<uint32_t*>(ptr) + 1);
381 return c.d;
382 #else
383 return *reinterpret_cast<double*>(ptr);
384 #endif
372 } 385 }
373 386
374 void SetFrameSlot(unsigned offset, intptr_t value) { 387 void SetFrameSlot(unsigned offset, intptr_t value) {
375 *GetFrameSlotPointer(offset) = value; 388 *GetFrameSlotPointer(offset) = value;
376 } 389 }
377 390
378 intptr_t GetRegister(unsigned n) const { 391 intptr_t GetRegister(unsigned n) const {
379 ASSERT(n < ARRAY_SIZE(registers_)); 392 ASSERT(n < ARRAY_SIZE(registers_));
380 return registers_[n]; 393 return registers_[n];
381 } 394 }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 Object** parameters_; 740 Object** parameters_;
728 Object** expression_stack_; 741 Object** expression_stack_;
729 742
730 friend class Deoptimizer; 743 friend class Deoptimizer;
731 }; 744 };
732 #endif 745 #endif
733 746
734 } } // namespace v8::internal 747 } } // namespace v8::internal
735 748
736 #endif // V8_DEOPTIMIZER_H_ 749 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/flag-definitions.h » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698