OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 // ---------------------------------------------------------------------------- | 101 // ---------------------------------------------------------------------------- |
102 | 102 |
103 | 103 |
104 Handle<Code> Builtins::GetCode(JavaScript id, bool* resolved) { | 104 Handle<Code> Builtins::GetCode(JavaScript id, bool* resolved) { |
105 Code* code = Builtins::builtin(Builtins::Illegal); | 105 Code* code = Builtins::builtin(Builtins::Illegal); |
106 *resolved = false; | 106 *resolved = false; |
107 | 107 |
108 if (Top::security_context() != NULL) { | 108 if (Top::context() != NULL) { |
109 Object* object = Top::security_context_builtins()->javascript_builtin(id); | 109 Object* object = Top::builtins()->javascript_builtin(id); |
110 if (object->IsJSFunction()) { | 110 if (object->IsJSFunction()) { |
111 Handle<JSFunction> function(JSFunction::cast(object)); | 111 Handle<JSFunction> function(JSFunction::cast(object)); |
112 // Make sure the number of parameters match the formal parameter count. | 112 // Make sure the number of parameters match the formal parameter count. |
113 ASSERT(function->shared()->formal_parameter_count() == | 113 ASSERT(function->shared()->formal_parameter_count() == |
114 Builtins::GetArgumentsCount(id)); | 114 Builtins::GetArgumentsCount(id)); |
115 if (function->is_compiled() || CompileLazy(function, CLEAR_EXCEPTION)) { | 115 if (function->is_compiled() || CompileLazy(function, CLEAR_EXCEPTION)) { |
116 code = function->code(); | 116 code = function->code(); |
117 *resolved = true; | 117 *resolved = true; |
118 } | 118 } |
119 } | 119 } |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 if (entry->contains(pc)) { | 706 if (entry->contains(pc)) { |
707 return names_[i]; | 707 return names_[i]; |
708 } | 708 } |
709 } | 709 } |
710 } | 710 } |
711 return NULL; | 711 return NULL; |
712 } | 712 } |
713 | 713 |
714 | 714 |
715 } } // namespace v8::internal | 715 } } // namespace v8::internal |
OLD | NEW |