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

Side by Side Diff: src/accessors.cc

Issue 1600923002: [runtime] Stop cloning AccessorInfo, just rely on PropertyAttributes for readonly. (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/accessors.h ('k') | src/objects.h » ('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/accessors.h" 5 #include "src/accessors.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 23 matching lines...) Expand all
34 info->set_is_special_data_property(true); 34 info->set_is_special_data_property(true);
35 info->set_name(*name); 35 info->set_name(*name);
36 Handle<Object> get = v8::FromCData(isolate, getter); 36 Handle<Object> get = v8::FromCData(isolate, getter);
37 Handle<Object> set = v8::FromCData(isolate, setter); 37 Handle<Object> set = v8::FromCData(isolate, setter);
38 info->set_getter(*get); 38 info->set_getter(*get);
39 info->set_setter(*set); 39 info->set_setter(*set);
40 return info; 40 return info;
41 } 41 }
42 42
43 43
44 Handle<AccessorInfo> Accessors::CloneAccessor(Isolate* isolate,
45 Handle<AccessorInfo> accessor) {
46 Factory* factory = isolate->factory();
47 Handle<AccessorInfo> info = factory->NewAccessorInfo();
48 info->set_name(accessor->name());
49 info->set_flag(accessor->flag());
50 info->set_expected_receiver_type(accessor->expected_receiver_type());
51 info->set_getter(accessor->getter());
52 info->set_setter(accessor->setter());
53 info->set_data(accessor->data());
54 return info;
55 }
56
57
58 static V8_INLINE bool CheckForName(Handle<Name> name, 44 static V8_INLINE bool CheckForName(Handle<Name> name,
59 Handle<String> property_name, 45 Handle<String> property_name,
60 int offset, 46 int offset,
61 int* object_offset) { 47 int* object_offset) {
62 if (Name::Equals(name, property_name)) { 48 if (Name::Equals(name, property_name)) {
63 *object_offset = offset; 49 *object_offset = offset;
64 return true; 50 return true;
65 } 51 }
66 return false; 52 return false;
67 } 53 }
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 Isolate* isolate = name->GetIsolate(); 1419 Isolate* isolate = name->GetIsolate();
1434 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, 1420 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport,
1435 &ModuleSetExport, attributes); 1421 &ModuleSetExport, attributes);
1436 info->set_data(Smi::FromInt(index)); 1422 info->set_data(Smi::FromInt(index));
1437 return info; 1423 return info;
1438 } 1424 }
1439 1425
1440 1426
1441 } // namespace internal 1427 } // namespace internal
1442 } // namespace v8 1428 } // namespace v8
OLDNEW
« no previous file with comments | « src/accessors.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698