| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 Factory::NewStringFromAscii(CStrVector(func_pos_src)); | 81 Factory::NewStringFromAscii(CStrVector(func_pos_src)); |
| 82 int func_pos = Runtime::StringMatch(Isolate::Current()->runtime_state(), | 82 int func_pos = Runtime::StringMatch(Isolate::Current()->runtime_state(), |
| 83 script_src, | 83 script_src, |
| 84 func_pos_str, | 84 func_pos_str, |
| 85 0); | 85 0); |
| 86 CHECK_NE(0, func_pos); | 86 CHECK_NE(0, func_pos); |
| 87 | 87 |
| 88 #ifdef ENABLE_DEBUGGER_SUPPORT | 88 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 89 // Obtain SharedFunctionInfo for the function. | 89 // Obtain SharedFunctionInfo for the function. |
| 90 Object* shared_func_info_ptr = | 90 Object* shared_func_info_ptr = |
| 91 Runtime::FindSharedFunctionInfoInScript(HEAP, i_script, func_pos); | 91 Runtime::FindSharedFunctionInfoInScript(Isolate::Current(), |
| 92 i_script, |
| 93 func_pos); |
| 92 CHECK(shared_func_info_ptr != HEAP->undefined_value()); | 94 CHECK(shared_func_info_ptr != HEAP->undefined_value()); |
| 93 Handle<SharedFunctionInfo> shared_func_info( | 95 Handle<SharedFunctionInfo> shared_func_info( |
| 94 SharedFunctionInfo::cast(shared_func_info_ptr)); | 96 SharedFunctionInfo::cast(shared_func_info_ptr)); |
| 95 | 97 |
| 96 // Verify inferred function name. | 98 // Verify inferred function name. |
| 97 SmartPointer<char> inferred_name = | 99 SmartPointer<char> inferred_name = |
| 98 shared_func_info->inferred_name()->ToCString(); | 100 shared_func_info->inferred_name()->ToCString(); |
| 99 CHECK_EQ(ref_inferred_name, *inferred_name); | 101 CHECK_EQ(ref_inferred_name, *inferred_name); |
| 100 #endif // ENABLE_DEBUGGER_SUPPORT | 102 #endif // ENABLE_DEBUGGER_SUPPORT |
| 101 } | 103 } |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 InitializeVM(); | 274 InitializeVM(); |
| 273 v8::HandleScope scope; | 275 v8::HandleScope scope; |
| 274 | 276 |
| 275 v8::Handle<v8::Script> script = Compile( | 277 v8::Handle<v8::Script> script = Compile( |
| 276 "function a() {\n" | 278 "function a() {\n" |
| 277 "var result = function(p,a,c,k,e,d)" | 279 "var result = function(p,a,c,k,e,d)" |
| 278 "{return p}(\"if blah blah\",62,1976,\'a|b\'.split(\'|\'),0,{})\n" | 280 "{return p}(\"if blah blah\",62,1976,\'a|b\'.split(\'|\'),0,{})\n" |
| 279 "}"); | 281 "}"); |
| 280 CheckFunctionName(script, "return p", ""); | 282 CheckFunctionName(script, "return p", ""); |
| 281 } | 283 } |
| OLD | NEW |