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

Side by Side Diff: src/isolate.cc

Issue 10176004: Make static API getters inlineable again. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reorder Isolate fields to fix alignment. Created 8 years, 8 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/isolate.h ('k') | src/serialize.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 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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 PrintF("Isolate %p " #tag "\n", reinterpret_cast<void*>(this)); \ 1423 PrintF("Isolate %p " #tag "\n", reinterpret_cast<void*>(this)); \
1424 } \ 1424 } \
1425 } while (false) 1425 } while (false)
1426 #else 1426 #else
1427 #define TRACE_ISOLATE(tag) 1427 #define TRACE_ISOLATE(tag)
1428 #endif 1428 #endif
1429 1429
1430 1430
1431 Isolate::Isolate() 1431 Isolate::Isolate()
1432 : state_(UNINITIALIZED), 1432 : state_(UNINITIALIZED),
1433 embedder_data_(NULL),
1433 entry_stack_(NULL), 1434 entry_stack_(NULL),
1434 stack_trace_nesting_level_(0), 1435 stack_trace_nesting_level_(0),
1435 incomplete_message_(NULL), 1436 incomplete_message_(NULL),
1436 preallocated_memory_thread_(NULL), 1437 preallocated_memory_thread_(NULL),
1437 preallocated_message_space_(NULL), 1438 preallocated_message_space_(NULL),
1438 bootstrapper_(NULL), 1439 bootstrapper_(NULL),
1439 runtime_profiler_(NULL), 1440 runtime_profiler_(NULL),
1440 compilation_cache_(NULL), 1441 compilation_cache_(NULL),
1441 counters_(NULL), 1442 counters_(NULL),
1442 code_range_(NULL), 1443 code_range_(NULL),
(...skipping 22 matching lines...) Expand all
1465 inner_pointer_to_code_cache_(NULL), 1466 inner_pointer_to_code_cache_(NULL),
1466 write_input_buffer_(NULL), 1467 write_input_buffer_(NULL),
1467 global_handles_(NULL), 1468 global_handles_(NULL),
1468 context_switcher_(NULL), 1469 context_switcher_(NULL),
1469 thread_manager_(NULL), 1470 thread_manager_(NULL),
1470 fp_stubs_generated_(false), 1471 fp_stubs_generated_(false),
1471 has_installed_extensions_(false), 1472 has_installed_extensions_(false),
1472 string_tracker_(NULL), 1473 string_tracker_(NULL),
1473 regexp_stack_(NULL), 1474 regexp_stack_(NULL),
1474 date_cache_(NULL), 1475 date_cache_(NULL),
1475 embedder_data_(NULL),
1476 context_exit_happened_(false) { 1476 context_exit_happened_(false) {
1477 TRACE_ISOLATE(constructor); 1477 TRACE_ISOLATE(constructor);
1478 1478
1479 memset(isolate_addresses_, 0, 1479 memset(isolate_addresses_, 0,
1480 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1480 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1481 1481
1482 heap_.isolate_ = this; 1482 heap_.isolate_ = this;
1483 zone_.isolate_ = this; 1483 zone_.isolate_ = this;
1484 stack_guard_.isolate_ = this; 1484 stack_guard_.isolate_ = this;
1485 1485
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 runtime_profiler_->SetUp(); 1850 runtime_profiler_->SetUp();
1851 1851
1852 // If we are deserializing, log non-function code objects and compiled 1852 // If we are deserializing, log non-function code objects and compiled
1853 // functions found in the snapshot. 1853 // functions found in the snapshot.
1854 if (des != NULL && (FLAG_log_code || FLAG_ll_prof)) { 1854 if (des != NULL && (FLAG_log_code || FLAG_ll_prof)) {
1855 HandleScope scope; 1855 HandleScope scope;
1856 LOG(this, LogCodeObjects()); 1856 LOG(this, LogCodeObjects());
1857 LOG(this, LogCompiledFunctions()); 1857 LOG(this, LogCompiledFunctions());
1858 } 1858 }
1859 1859
1860 CHECK_EQ(OFFSET_OF(Isolate, state_),
1861 static_cast<intptr_t>(Internals::kIsolateStateOffset));
1862 CHECK_EQ(OFFSET_OF(Isolate, embedder_data_),
1863 static_cast<intptr_t>(Internals::kIsolateEmbedderDataOffset));
1864 CHECK_EQ(OFFSET_OF(Isolate, heap_.roots_),
1865 static_cast<intptr_t>(Internals::kIsolateRootsOffset));
1866
1860 state_ = INITIALIZED; 1867 state_ = INITIALIZED;
1861 time_millis_at_init_ = OS::TimeCurrentMillis(); 1868 time_millis_at_init_ = OS::TimeCurrentMillis();
1862 return true; 1869 return true;
1863 } 1870 }
1864 1871
1865 1872
1866 // Initialized lazily to allow early 1873 // Initialized lazily to allow early
1867 // v8::V8::SetAddHistogramSampleFunction calls. 1874 // v8::V8::SetAddHistogramSampleFunction calls.
1868 StatsTable* Isolate::stats_table() { 1875 StatsTable* Isolate::stats_table() {
1869 if (stats_table_ == NULL) { 1876 if (stats_table_ == NULL) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 1951
1945 #ifdef DEBUG 1952 #ifdef DEBUG
1946 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1953 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1947 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 1954 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
1948 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1955 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1949 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1956 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1950 #undef ISOLATE_FIELD_OFFSET 1957 #undef ISOLATE_FIELD_OFFSET
1951 #endif 1958 #endif
1952 1959
1953 } } // namespace v8::internal 1960 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698