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

Side by Side Diff: src/bootstrapper.cc

Issue 3398014: Fix possible evaluation order problems. (Closed)
Patch Set: fixed more places Created 10 years, 3 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 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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 void Genesis::InstallJSFunctionResultCaches() { 1406 void Genesis::InstallJSFunctionResultCaches() {
1407 const int kNumberOfCaches = 0 + 1407 const int kNumberOfCaches = 0 +
1408 #define F(size, func) + 1 1408 #define F(size, func) + 1
1409 JSFUNCTION_RESULT_CACHE_LIST(F) 1409 JSFUNCTION_RESULT_CACHE_LIST(F)
1410 #undef F 1410 #undef F
1411 ; 1411 ;
1412 1412
1413 Handle<FixedArray> caches = Factory::NewFixedArray(kNumberOfCaches, TENURED); 1413 Handle<FixedArray> caches = Factory::NewFixedArray(kNumberOfCaches, TENURED);
1414 1414
1415 int index = 0; 1415 int index = 0;
1416 #define F(size, func) caches->set(index++, CreateCache(size, func)); 1416
1417 #define F(size, func) do { \
1418 FixedArray* cache = CreateCache(size, func); \
1419 caches->set(index++, cache); \
1420 } while (false);
Erik Corry 2010/09/23 07:53:28 You need to lose the semicolon here.
1421
1417 JSFUNCTION_RESULT_CACHE_LIST(F) 1422 JSFUNCTION_RESULT_CACHE_LIST(F)
1423
1418 #undef F 1424 #undef F
1419 1425
1420 global_context()->set_jsfunction_result_caches(*caches); 1426 global_context()->set_jsfunction_result_caches(*caches);
1421 } 1427 }
1422 1428
1423 1429
1424 void Genesis::InitializeNormalizedMapCaches() { 1430 void Genesis::InitializeNormalizedMapCaches() {
1425 Handle<FixedArray> array( 1431 Handle<FixedArray> array(
1426 Factory::NewFixedArray(NormalizedMapCache::kEntries, TENURED)); 1432 Factory::NewFixedArray(NormalizedMapCache::kEntries, TENURED));
1427 global_context()->set_normalized_map_cache(NormalizedMapCache::cast(*array)); 1433 global_context()->set_normalized_map_cache(NormalizedMapCache::cast(*array));
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 } 1855 }
1850 1856
1851 1857
1852 // Restore statics that are thread local. 1858 // Restore statics that are thread local.
1853 char* BootstrapperActive::RestoreState(char* from) { 1859 char* BootstrapperActive::RestoreState(char* from) {
1854 nesting_ = *reinterpret_cast<int*>(from); 1860 nesting_ = *reinterpret_cast<int*>(from);
1855 return from + sizeof(nesting_); 1861 return from + sizeof(nesting_);
1856 } 1862 }
1857 1863
1858 } } // namespace v8::internal 1864 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/api.cc ('k') | src/compilation-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698