| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/builtins/builtins-regexp.h" | 5 #include "src/builtins/builtins-regexp.h" |
| 6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
| 7 #include "src/builtins/builtins.h" | 7 #include "src/builtins/builtins.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stub-assembler.h" | 9 #include "src/code-stub-assembler.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 Bind(&stub_call); | 1219 Bind(&stub_call); |
| 1220 Return(regexp_call()); | 1220 Return(regexp_call()); |
| 1221 | 1221 |
| 1222 Bind(&slow_lookup); | 1222 Bind(&slow_lookup); |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 GotoIf(IsNullOrUndefined(object), &out); | 1225 GotoIf(IsNullOrUndefined(object), &out); |
| 1226 | 1226 |
| 1227 // Fall back to a slow lookup of {object[symbol]}. | 1227 // Fall back to a slow lookup of {object[symbol]}. |
| 1228 | 1228 |
| 1229 Callable getproperty_callable = CodeFactory::GetProperty(isolate()); | 1229 Node* const maybe_func = GetProperty(context, object, symbol); |
| 1230 Node* const key = HeapConstant(symbol); | |
| 1231 Node* const maybe_func = CallStub(getproperty_callable, context, object, key); | |
| 1232 | |
| 1233 GotoIf(IsUndefined(maybe_func), &out); | 1230 GotoIf(IsUndefined(maybe_func), &out); |
| 1234 | 1231 |
| 1235 // Attempt to call the function. | 1232 // Attempt to call the function. |
| 1236 | 1233 |
| 1237 Node* const result = generic_call(maybe_func); | 1234 Node* const result = generic_call(maybe_func); |
| 1238 Return(result); | 1235 Return(result); |
| 1239 | 1236 |
| 1240 Bind(&out); | 1237 Bind(&out); |
| 1241 } | 1238 } |
| 1242 | 1239 |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2159 | 2156 |
| 2160 BUILTIN(StringPrototypeToUpperCase) { | 2157 BUILTIN(StringPrototypeToUpperCase) { |
| 2161 HandleScope scope(isolate); | 2158 HandleScope scope(isolate); |
| 2162 TO_THIS_STRING(string, "String.prototype.toUpperCase"); | 2159 TO_THIS_STRING(string, "String.prototype.toUpperCase"); |
| 2163 return ConvertCase(string, isolate, | 2160 return ConvertCase(string, isolate, |
| 2164 isolate->runtime_state()->to_upper_mapping()); | 2161 isolate->runtime_state()->to_upper_mapping()); |
| 2165 } | 2162 } |
| 2166 | 2163 |
| 2167 } // namespace internal | 2164 } // namespace internal |
| 2168 } // namespace v8 | 2165 } // namespace v8 |
| OLD | NEW |