Changeset 192876 in webkit for trunk/Source/JavaScriptCore/runtime/Executable.h
- Timestamp:
- Dec 1, 2015, 1:46:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Executable.h
r190827 r192876 345 345 bool usesArguments() const { return m_features & ArgumentsFeature; } 346 346 bool needsActivation() const { return m_hasCapturedVariables || m_features & (EvalFeature | WithFeature); } 347 bool isArrowFunctionContext() const { return m_isArrowFunctionContext; } 347 348 bool isStrictMode() const { return m_features & StrictModeFeature; } 349 bool isDerivedConstructorContext() const { return m_isDerivedConstructorContext; } 348 350 ECMAMode ecmaMode() const { return isStrictMode() ? StrictMode : NotStrictMode; } 349 351 … … 394 396 395 397 protected: 396 ScriptExecutable(Structure* structure, VM& vm, const SourceCode& source, bool isInStrictContext);398 ScriptExecutable(Structure*, VM&, const SourceCode&, bool isInStrictContext, bool isInDerivedConstructorContext, bool isInArrowFunctionContext); 397 399 398 400 void finishCreation(VM& vm) … … 413 415 bool m_neverOptimize { false }; 414 416 bool m_didTryToEnterInLoop; 417 bool m_isDerivedConstructorContext; 418 bool m_isArrowFunctionContext; 415 419 int m_overrideLineNumber; 416 420 int m_firstLine; … … 435 439 } 436 440 437 static EvalExecutable* create(ExecState*, const SourceCode&, bool isInStrictContext, ThisTDZMode, const VariableEnvironment*);441 static EvalExecutable* create(ExecState*, const SourceCode&, bool isInStrictContext, ThisTDZMode, bool isDerivedConstructorContext, bool isArrowFunctionContext, const VariableEnvironment*); 438 442 439 443 PassRefPtr<JITCode> generatedJITCode() … … 449 453 DECLARE_INFO; 450 454 451 ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false ); }455 ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false, isDerivedConstructorContext(), isArrowFunctionContext()); } 452 456 453 457 unsigned numVariables() { return m_unlinkedEvalCodeBlock->numVariables(); } … … 457 461 friend class ExecutableBase; 458 462 friend class ScriptExecutable; 459 EvalExecutable(ExecState*, const SourceCode&, bool );463 EvalExecutable(ExecState*, const SourceCode&, bool inStrictContext, bool isDerivedConstructorContext, bool isArrowFunctionContext); 460 464 461 465 static void visitChildren(JSCell*, SlotVisitor&); … … 502 506 DECLARE_INFO; 503 507 504 ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false ); }508 ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false, isDerivedConstructorContext(), false); } 505 509 506 510 private: … … 543 547 DECLARE_INFO; 544 548 545 ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false); } 549 ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false, isDerivedConstructorContext(), false); } 550 546 551 UnlinkedModuleProgramCodeBlock* unlinkedModuleProgramCodeBlock() { return m_unlinkedModuleProgramCodeBlock.get(); } 547 552 … … 652 657 ConstructAbility constructAbility() const { return m_unlinkedExecutable->constructAbility(); } 653 658 bool isArrowFunction() const { return m_unlinkedExecutable->isArrowFunction(); } 659 bool isDerivedConstructorContext() const { return m_unlinkedExecutable->isDerivedConstructorContext(); } 654 660 bool isClassConstructorFunction() const { return m_unlinkedExecutable->isClassConstructorFunction(); } 655 661 const Identifier& name() { return m_unlinkedExecutable->name(); }
Note:
See TracChangeset
for help on using the changeset viewer.