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

Side by Side Diff: src/snapshot/serialize.cc

Issue 1632603002: [api] Default native data property setter to replace the setter if the property is writable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/regress/regress-crbug-580584.js » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/snapshot/serialize.h" 5 #include "src/snapshot/serialize.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 // Accessors 262 // Accessors
263 struct AccessorRefTable { 263 struct AccessorRefTable {
264 Address address; 264 Address address;
265 const char* name; 265 const char* name;
266 }; 266 };
267 267
268 static const AccessorRefTable accessors[] = { 268 static const AccessorRefTable accessors[] = {
269 #define ACCESSOR_INFO_DECLARATION(name) \ 269 #define ACCESSOR_INFO_DECLARATION(name) \
270 { FUNCTION_ADDR(&Accessors::name##Getter), "Accessors::" #name "Getter" } \ 270 { FUNCTION_ADDR(&Accessors::name##Getter), "Accessors::" #name "Getter" } \
271 , {FUNCTION_ADDR(&Accessors::name##Setter), "Accessors::" #name "Setter"}, 271 ,
272 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) 272 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION)
273 #undef ACCESSOR_INFO_DECLARATION 273 #undef ACCESSOR_INFO_DECLARATION
274 #define ACCESSOR_SETTER_DECLARATION(name) \
275 { FUNCTION_ADDR(&Accessors::name), "Accessors::" #name } \
276 ,
277 ACCESSOR_SETTER_LIST(ACCESSOR_SETTER_DECLARATION)
278 #undef ACCESSOR_INFO_DECLARATION
274 }; 279 };
275 280
276 for (unsigned i = 0; i < arraysize(accessors); ++i) { 281 for (unsigned i = 0; i < arraysize(accessors); ++i) {
277 Add(accessors[i].address, accessors[i].name); 282 Add(accessors[i].address, accessors[i].name);
278 } 283 }
279 284
280 StubCache* stub_cache = isolate->stub_cache(); 285 StubCache* stub_cache = isolate->stub_cache();
281 286
282 // Stub cache tables 287 // Stub cache tables
283 Add(stub_cache->key_reference(StubCache::kPrimary).address(), 288 Add(stub_cache->key_reference(StubCache::kPrimary).address(),
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 SerializedCodeData* scd = new SerializedCodeData(cached_data); 2800 SerializedCodeData* scd = new SerializedCodeData(cached_data);
2796 SanityCheckResult r = scd->SanityCheck(isolate, source); 2801 SanityCheckResult r = scd->SanityCheck(isolate, source);
2797 if (r == CHECK_SUCCESS) return scd; 2802 if (r == CHECK_SUCCESS) return scd;
2798 cached_data->Reject(); 2803 cached_data->Reject();
2799 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 2804 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
2800 delete scd; 2805 delete scd;
2801 return NULL; 2806 return NULL;
2802 } 2807 }
2803 } // namespace internal 2808 } // namespace internal
2804 } // namespace v8 2809 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/regress/regress-crbug-580584.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698