Changeset 163418 in webkit for trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.cpp
- Timestamp:
- Feb 4, 2014, 5:03:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/TestRunnerUtils.cpp
r156240 r163418 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 32 32 namespace JSC { 33 33 34 static FunctionExecutable* getExecutable(JSValue theFunctionValue)34 FunctionExecutable* getExecutableForFunction(JSValue theFunctionValue) 35 35 { 36 36 JSFunction* theFunction = jsDynamicCast<JSFunction*>(theFunctionValue); … … 41 41 theFunction->executable()); 42 42 return executable; 43 } 44 45 CodeBlock* getSomeBaselineCodeBlockForFunction(JSValue theFunctionValue) 46 { 47 FunctionExecutable* executable = getExecutableForFunction(theFunctionValue); 48 if (!executable) 49 return 0; 50 51 CodeBlock* baselineCodeBlock = executable->baselineCodeBlockFor(CodeForCall); 52 53 if (!baselineCodeBlock) 54 baselineCodeBlock = executable->baselineCodeBlockFor(CodeForConstruct); 55 56 return baselineCodeBlock; 43 57 } 44 58 … … 52 66 pretendToHaveManyCompiles = true; 53 67 #endif 54 55 if (FunctionExecutable* executable = getExecutable(theFunctionValue)) {56 CodeBlock* baselineCodeBlock = executable->baselineCodeBlockFor(CodeForCall);57 58 if (!baselineCodeBlock)59 baselineCodeBlock = executable->baselineCodeBlockFor(CodeForConstruct);60 61 if (!baselineCodeBlock)62 return jsNumber(0);63 68 69 if (CodeBlock* baselineCodeBlock = getSomeBaselineCodeBlockForFunction(theFunctionValue)) { 64 70 if (pretendToHaveManyCompiles) 65 71 return jsNumber(1000000.0); … … 67 73 } 68 74 69 return js Undefined();75 return jsNumber(0); 70 76 } 71 77 72 78 JSValue setNeverInline(JSValue theFunctionValue) 73 79 { 74 if (FunctionExecutable* executable = getExecutable (theFunctionValue))80 if (FunctionExecutable* executable = getExecutableForFunction(theFunctionValue)) 75 81 executable->setNeverInline(true); 76 82
Note:
See TracChangeset
for help on using the changeset viewer.