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

Side by Side Diff: src/isolate.h

Issue 9572008: Implement date library functions in C++. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Bug fixes. Created 8 years, 9 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
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 18 matching lines...) Expand all
29 #define V8_ISOLATE_H_ 29 #define V8_ISOLATE_H_
30 30
31 #include "../include/v8-debug.h" 31 #include "../include/v8-debug.h"
32 #include "allocation.h" 32 #include "allocation.h"
33 #include "apiutils.h" 33 #include "apiutils.h"
34 #include "atomicops.h" 34 #include "atomicops.h"
35 #include "builtins.h" 35 #include "builtins.h"
36 #include "contexts.h" 36 #include "contexts.h"
37 #include "execution.h" 37 #include "execution.h"
38 #include "frames.h" 38 #include "frames.h"
39 #include "date.h"
39 #include "global-handles.h" 40 #include "global-handles.h"
40 #include "handles.h" 41 #include "handles.h"
41 #include "hashmap.h" 42 #include "hashmap.h"
42 #include "heap.h" 43 #include "heap.h"
43 #include "regexp-stack.h" 44 #include "regexp-stack.h"
44 #include "runtime-profiler.h" 45 #include "runtime-profiler.h"
45 #include "runtime.h" 46 #include "runtime.h"
46 #include "zone.h" 47 #include "zone.h"
47 48
48 namespace v8 { 49 namespace v8 {
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 return context_exit_happened_; 1011 return context_exit_happened_;
1011 } 1012 }
1012 void set_context_exit_happened(bool context_exit_happened) { 1013 void set_context_exit_happened(bool context_exit_happened) {
1013 context_exit_happened_ = context_exit_happened; 1014 context_exit_happened_ = context_exit_happened;
1014 } 1015 }
1015 1016
1016 double time_millis_since_init() { 1017 double time_millis_since_init() {
1017 return OS::TimeCurrentMillis() - time_millis_at_init_; 1018 return OS::TimeCurrentMillis() - time_millis_at_init_;
1018 } 1019 }
1019 1020
1021 DateCache* date_cache() {
1022 return &date_cache_;
1023 }
1024
1020 private: 1025 private:
1021 Isolate(); 1026 Isolate();
1022 1027
1023 // The per-process lock should be acquired before the ThreadDataTable is 1028 // The per-process lock should be acquired before the ThreadDataTable is
1024 // modified. 1029 // modified.
1025 class ThreadDataTable { 1030 class ThreadDataTable {
1026 public: 1031 public:
1027 ThreadDataTable(); 1032 ThreadDataTable();
1028 ~ThreadDataTable(); 1033 ~ThreadDataTable();
1029 1034
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; 1192 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
1188 void* embedder_data_; 1193 void* embedder_data_;
1189 1194
1190 // The garbage collector should be a little more aggressive when it knows 1195 // The garbage collector should be a little more aggressive when it knows
1191 // that a context was recently exited. 1196 // that a context was recently exited.
1192 bool context_exit_happened_; 1197 bool context_exit_happened_;
1193 1198
1194 // Time stamp at initialization. 1199 // Time stamp at initialization.
1195 double time_millis_at_init_; 1200 double time_millis_at_init_;
1196 1201
1202
1203 DateCache date_cache_;
1204
1197 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ 1205 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
1198 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) 1206 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
1199 bool simulator_initialized_; 1207 bool simulator_initialized_;
1200 HashMap* simulator_i_cache_; 1208 HashMap* simulator_i_cache_;
1201 Redirection* simulator_redirection_; 1209 Redirection* simulator_redirection_;
1202 #endif 1210 #endif
1203 1211
1204 #ifdef DEBUG 1212 #ifdef DEBUG
1205 // A static array of histogram info for each type. 1213 // A static array of histogram info for each type.
1206 HistogramInfo heap_histograms_[LAST_TYPE + 1]; 1214 HistogramInfo heap_histograms_[LAST_TYPE + 1];
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 return global_context()->out_of_memory()->IsTrue(); 1390 return global_context()->out_of_memory()->IsTrue();
1383 } 1391 }
1384 1392
1385 1393
1386 // Mark the global context with out of memory. 1394 // Mark the global context with out of memory.
1387 inline void Context::mark_out_of_memory() { 1395 inline void Context::mark_out_of_memory() {
1388 global_context()->set_out_of_memory(HEAP->true_value()); 1396 global_context()->set_out_of_memory(HEAP->true_value());
1389 } 1397 }
1390 1398
1391 1399
1400
rossberg 2012/03/06 15:55:50 Accidental newline?
ulan 2012/03/07 10:55:21 Done.
1392 } } // namespace v8::internal 1401 } } // namespace v8::internal
1393 1402
1394 #endif // V8_ISOLATE_H_ 1403 #endif // V8_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698