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

Side by Side Diff: src/top.cc

Issue 4044003: Clean up definitions in simulator. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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/top.h ('k') | src/v8.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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 60
61 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { 61 v8::TryCatch* ThreadLocalTop::TryCatchHandler() {
62 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); 62 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address());
63 } 63 }
64 64
65 65
66 void ThreadLocalTop::Initialize() { 66 void ThreadLocalTop::Initialize() {
67 c_entry_fp_ = 0; 67 c_entry_fp_ = 0;
68 handler_ = 0; 68 handler_ = 0;
69 #ifdef USE_SIMULATOR
70 simulator_ = assembler::arm::Simulator::current();
71 #endif // USE_SIMULATOR
69 #ifdef ENABLE_LOGGING_AND_PROFILING 72 #ifdef ENABLE_LOGGING_AND_PROFILING
70 js_entry_sp_ = 0; 73 js_entry_sp_ = 0;
71 #endif 74 #endif
72 #ifdef ENABLE_VMSTATE_TRACKING 75 #ifdef ENABLE_VMSTATE_TRACKING
73 current_vm_state_ = NULL; 76 current_vm_state_ = NULL;
74 #endif 77 #endif
75 try_catch_handler_address_ = NULL; 78 try_catch_handler_address_ = NULL;
76 context_ = NULL; 79 context_ = NULL;
77 int id = ThreadManager::CurrentId(); 80 int id = ThreadManager::CurrentId();
78 thread_id_ = (id == 0) ? ThreadManager::kInvalidId : id; 81 thread_id_ = (id == 0) ? ThreadManager::kInvalidId : id;
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1056
1054 char* Top::ArchiveThread(char* to) { 1057 char* Top::ArchiveThread(char* to) {
1055 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(thread_local_)); 1058 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(thread_local_));
1056 InitializeThreadLocal(); 1059 InitializeThreadLocal();
1057 return to + sizeof(thread_local_); 1060 return to + sizeof(thread_local_);
1058 } 1061 }
1059 1062
1060 1063
1061 char* Top::RestoreThread(char* from) { 1064 char* Top::RestoreThread(char* from) {
1062 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_)); 1065 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_));
1066 // This might be just paranoia, but it seems to be needed in case a
1067 // thread_local_ is restored on a separate OS thread.
1068 #ifdef USE_SIMULATOR
1069 thread_local_.simulator_ = assembler::arm::Simulator::current();
1070 #endif
1063 return from + sizeof(thread_local_); 1071 return from + sizeof(thread_local_);
1064 } 1072 }
1065 1073
1066 1074
1067 ExecutionAccess::ExecutionAccess() { 1075 ExecutionAccess::ExecutionAccess() {
1068 Top::break_access_->Lock(); 1076 Top::break_access_->Lock();
1069 } 1077 }
1070 1078
1071 1079
1072 ExecutionAccess::~ExecutionAccess() { 1080 ExecutionAccess::~ExecutionAccess() {
1073 Top::break_access_->Unlock(); 1081 Top::break_access_->Unlock();
1074 } 1082 }
1075 1083
1076 1084
1077 } } // namespace v8::internal 1085 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/top.h ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698