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

Side by Side Diff: src/mips/simulator-mips.h

Issue 1371083003: [presubmit] Enable readability/namespace linter checking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 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
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/assembler-mips64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Declares a Simulator for MIPS instructions if we are not generating a native 6 // Declares a Simulator for MIPS instructions if we are not generating a native
7 // MIPS binary. This Simulator allows us to run and debug MIPS code generation 7 // MIPS binary. This Simulator allows us to run and debug MIPS code generation
8 // on regular desktop machines. 8 // on regular desktop machines.
9 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, 9 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro,
10 // which will start execution in the Simulator or forwards to the real entry 10 // which will start execution in the Simulator or forwards to the real entry
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return c_limit; 48 return c_limit;
49 } 49 }
50 50
51 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { 51 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) {
52 return try_catch_address; 52 return try_catch_address;
53 } 53 }
54 54
55 static inline void UnregisterCTryCatch() { } 55 static inline void UnregisterCTryCatch() { }
56 }; 56 };
57 57
58 } } // namespace v8::internal 58 } // namespace internal
59 } // namespace v8
59 60
60 // Calculated the stack limit beyond which we will throw stack overflow errors. 61 // Calculated the stack limit beyond which we will throw stack overflow errors.
61 // This macro must be called from a C++ method. It relies on being able to take 62 // This macro must be called from a C++ method. It relies on being able to take
62 // the address of "this" to get a value on the current execution stack and then 63 // the address of "this" to get a value on the current execution stack and then
63 // calculates the stack limit based on that value. 64 // calculates the stack limit based on that value.
64 // NOTE: The check for overflow is not safe as there is no guarantee that the 65 // NOTE: The check for overflow is not safe as there is no guarantee that the
65 // running thread has its stack in all memory up to address 0x00000000. 66 // running thread has its stack in all memory up to address 0x00000000.
66 #define GENERATED_CODE_STACK_LIMIT(limit) \ 67 #define GENERATED_CODE_STACK_LIMIT(limit) \
67 (reinterpret_cast<uintptr_t>(this) >= limit ? \ 68 (reinterpret_cast<uintptr_t>(this) >= limit ? \
68 reinterpret_cast<uintptr_t>(this) - limit : 0) 69 reinterpret_cast<uintptr_t>(this) - limit : 0)
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { 474 static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) {
474 Simulator* sim = Simulator::current(Isolate::Current()); 475 Simulator* sim = Simulator::current(Isolate::Current());
475 return sim->PushAddress(try_catch_address); 476 return sim->PushAddress(try_catch_address);
476 } 477 }
477 478
478 static inline void UnregisterCTryCatch() { 479 static inline void UnregisterCTryCatch() {
479 Simulator::current(Isolate::Current())->PopAddress(); 480 Simulator::current(Isolate::Current())->PopAddress();
480 } 481 }
481 }; 482 };
482 483
483 } } // namespace v8::internal 484 } // namespace internal
485 } // namespace v8
484 486
485 #endif // !defined(USE_SIMULATOR) 487 #endif // !defined(USE_SIMULATOR)
486 #endif // V8_MIPS_SIMULATOR_MIPS_H_ 488 #endif // V8_MIPS_SIMULATOR_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698