OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 | 71 |
72 VariableProxy::VariableProxy(Isolate* isolate, Variable* var) | 72 VariableProxy::VariableProxy(Isolate* isolate, Variable* var) |
73 : Expression(isolate), | 73 : Expression(isolate), |
74 name_(var->name()), | 74 name_(var->name()), |
75 var_(NULL), // Will be set by the call to BindTo. | 75 var_(NULL), // Will be set by the call to BindTo. |
76 is_this_(var->is_this()), | 76 is_this_(var->is_this()), |
77 is_trivial_(false), | 77 is_trivial_(false), |
78 is_lvalue_(false), | 78 is_lvalue_(false), |
79 position_(RelocInfo::kNoPosition) { | 79 position_(RelocInfo::kNoPosition), |
| 80 interface_(var->interface()) { |
80 BindTo(var); | 81 BindTo(var); |
81 } | 82 } |
82 | 83 |
83 | 84 |
84 VariableProxy::VariableProxy(Isolate* isolate, | 85 VariableProxy::VariableProxy(Isolate* isolate, |
85 Handle<String> name, | 86 Handle<String> name, |
86 bool is_this, | 87 bool is_this, |
87 int position) | 88 int position, |
| 89 Interface* interface) |
88 : Expression(isolate), | 90 : Expression(isolate), |
89 name_(name), | 91 name_(name), |
90 var_(NULL), | 92 var_(NULL), |
91 is_this_(is_this), | 93 is_this_(is_this), |
92 is_trivial_(false), | 94 is_trivial_(false), |
93 is_lvalue_(false), | 95 is_lvalue_(false), |
94 position_(position) { | 96 position_(position), |
| 97 interface_(interface) { |
95 // Names must be canonicalized for fast equality checks. | 98 // Names must be canonicalized for fast equality checks. |
96 ASSERT(name->IsSymbol()); | 99 ASSERT(name->IsSymbol()); |
97 } | 100 } |
98 | 101 |
99 | 102 |
100 void VariableProxy::BindTo(Variable* var) { | 103 void VariableProxy::BindTo(Variable* var) { |
101 ASSERT(var_ == NULL); // must be bound only once | 104 ASSERT(var_ == NULL); // must be bound only once |
102 ASSERT(var != NULL); // must bind | 105 ASSERT(var != NULL); // must bind |
103 ASSERT((is_this() && var->is_this()) || name_.is_identical_to(var->name())); | 106 ASSERT((is_this() && var->is_this()) || name_.is_identical_to(var->name())); |
104 // Ideally CONST-ness should match. However, this is very hard to achieve | 107 // Ideally CONST-ness should match. However, this is very hard to achieve |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || | 1162 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || |
1160 node->name()->IsEqualTo(CStrVector("_Arguments")))) { | 1163 node->name()->IsEqualTo(CStrVector("_Arguments")))) { |
1161 // Don't inline the %_ArgumentsLength or %_Arguments because their | 1164 // Don't inline the %_ArgumentsLength or %_Arguments because their |
1162 // implementation will not work. There is no stack frame to get them | 1165 // implementation will not work. There is no stack frame to get them |
1163 // from. | 1166 // from. |
1164 add_flag(kDontInline); | 1167 add_flag(kDontInline); |
1165 } | 1168 } |
1166 } | 1169 } |
1167 | 1170 |
1168 } } // namespace v8::internal | 1171 } } // namespace v8::internal |
OLD | NEW |