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

Side by Side Diff: src/stub-cache.cc

Issue 6788023: Per-isolate v8::Locker and v8::Unlocker (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New tests for IsLocker Created 9 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 24 matching lines...) Expand all
35 #include "vm-state-inl.h" 35 #include "vm-state-inl.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 // ----------------------------------------------------------------------- 40 // -----------------------------------------------------------------------
41 // StubCache implementation. 41 // StubCache implementation.
42 42
43 43
44 StubCache::StubCache(Isolate* isolate) : isolate_(isolate) { 44 StubCache::StubCache(Isolate* isolate) : isolate_(isolate) {
45 ASSERT(isolate == Isolate::Current());
Vitaly Repeshko 2011/04/15 00:29:39 Please restore this (see my comment in isolate.cc)
Dmitry Lomov 2011/04/19 01:50:47 Done.
46 memset(primary_, 0, sizeof(primary_[0]) * StubCache::kPrimaryTableSize); 45 memset(primary_, 0, sizeof(primary_[0]) * StubCache::kPrimaryTableSize);
47 memset(secondary_, 0, sizeof(secondary_[0]) * StubCache::kSecondaryTableSize); 46 memset(secondary_, 0, sizeof(secondary_[0]) * StubCache::kSecondaryTableSize);
48 } 47 }
49 48
50 49
51 void StubCache::Initialize(bool create_heap_objects) { 50 void StubCache::Initialize(bool create_heap_objects) {
52 ASSERT(IsPowerOf2(kPrimaryTableSize)); 51 ASSERT(IsPowerOf2(kPrimaryTableSize));
53 ASSERT(IsPowerOf2(kSecondaryTableSize)); 52 ASSERT(IsPowerOf2(kSecondaryTableSize));
54 if (create_heap_objects) { 53 if (create_heap_objects) {
55 HandleScope scope; 54 HandleScope scope;
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 } 1930 }
1932 Code* code = Code::cast(result); 1931 Code* code = Code::cast(result);
1933 USE(code); 1932 USE(code);
1934 PROFILE(isolate(), 1933 PROFILE(isolate(),
1935 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStub")); 1934 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStub"));
1936 return result; 1935 return result;
1937 } 1936 }
1938 1937
1939 1938
1940 } } // namespace v8::internal 1939 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698